Angular-calendar specific day problem


#1

I am using ionic v2, angular v4. Here is my problem. I have a calendar in my home page. By clicking a specific day in calendar, I want to create an alert popup which contains that specific day info (day-month-year). I can create alert popup but it shows same day info every time. Some code pieces:

home.html
<mwl-calendar-month-view
class=“calendar-comp”
[viewDate]=“date”
[weekStartsOn]=1
(click)=“temp(date)”>
home.ts
export class HomePage implements OnInit{

date = new Date(Date.now());

constructor(public navCtrl: NavController) { }

ngOnInit(){

}

temp(param){
alert(param);
}
}

library
npm install --save angular-calendar


#2

I would suggest trying to model your code after the clickable date demo.


#3

(dayClicked)=“clickedDate = $event.date”> is handle my problem,thnx :slight_smile: