Skip to content

Commit

Permalink
Move change detection into onReady
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Aug 30, 2024
1 parent 472b74f commit dd3a305
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export class OpModalSingleDatePickerComponent implements ControlValueAccessor, O
inline: true,
onReady: (_date:Date[], _datestr:string, instance:flatpickr.Instance) => {
instance.calendarContainer.classList.add('op-datepicker-modal--flatpickr-instance');
this.cdRef.detectChanges();
},
onChange: (dates:Date[]) => {
if (dates.length > 0) {
Expand All @@ -263,7 +264,6 @@ export class OpModalSingleDatePickerComponent implements ControlValueAccessor, O
},
this.flatpickrTarget.nativeElement as HTMLElement,
);
this.cdRef.detectChanges();
}

writeWorkingValue(value:string):void {
Expand Down

0 comments on commit dd3a305

Please sign in to comment.