Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement all events #100

Open
josh-k-cb opened this issue Mar 30, 2021 · 2 comments
Open

Implement all events #100

josh-k-cb opened this issue Mar 30, 2021 · 2 comments

Comments

@josh-k-cb
Copy link

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!

@CrackerakiUA
Copy link

@Josh-Kewley-BC have you managed this event?

@josh-k-cb
Copy link
Author

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;
    ....
   };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants