ng2-flatpickr
ng2-flatpickr copied to clipboard
Implement all events
I'd like to be able to leverage onDayCreate from flatpickr2 which would require adding a hook in the config. If this is something you'd consider, you might also provide support for the other events which aren't currently wired up (onMonthChange, onYearChange, etc) Thanks!
@Josh-Kewley-BC have you managed this event?
Turns out it's available, just not present in the embedded typedef.
private pickrOptions: FlatpickrOptions = {
minDate: '1-1-2020',
dateFormat: 'm-d-Y'
};
this.pickrOptions.onDayCreate = (dObj: any, dStr: any, fp: any, dayElem: any): void => {
// Utilize dayElem.dateObj, which is the corresponding Date
const dt = dayElem.dateObj as Date;
....
};