Bharath R

Bharath R

  • NA
  • 33
  • 4.3k

monthSelected Event Handler in OwlDateTimepicker not calling

Oct 14 2019 2:53 AM
I Need a Month Picker on my app so here i am using Owl-Date-picker, when the use selected the month the date picker have to close that as been handled by the monthSelected Event But My issue here in "monthSelected Event Handler Calling when select the month". I am here using angular 8.Please help me,Thanks
 
Here is my Code..
 
<owl-date-time [pickerType]="'calendar'" [startView]="'multi-years'" (change)='txtMonth_Change()' (yearSelected)="chosenYearHandler($event)"
(monthSelected)="chosenMonthHandler($event, dtMonth)" #dtMonth="owlDateTime"></owl-date-time>
 
chosenMonthHandler( normalizedMonth: Moment, datepicker: OwlDateTimeComponent<Moment> ) {
const ctrlValue = this.date.value;
ctrlValue.month(normalizedMonth.month());
this.date.setValue(ctrlValue);
datepicker.close();
}

Answers (2)