Implement all events
josh-k-cb opened this issue · comments
josh-k-cb commented
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!
Honchar Denys commented
@Josh-Kewley-BC have you managed this event?
josh-k-cb commented
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;
....
};