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

Set method is not working #1484

Closed
projct1 opened this issue Aug 30, 2018 · 1 comment
Closed

Set method is not working #1484

projct1 opened this issue Aug 30, 2018 · 1 comment

Comments

@projct1
Copy link

projct1 commented Aug 30, 2018

  • Flatpickr version used: 4.5.1
  • Browser name and version: Firefox 61.0.2 (64-bit)
  • OS and version: Windows 10
  • Environment: nodejs, webpack, es6, laravel-mix
require('jquery');
require('flatpickr');

let calendar = $('.datepicker').flatpickr();

if (true) {
    calendar.set('onChange', (selectedDates, dateStr, instance) => {
        alert(dateStr); //never happen
    });
}
@ankurk91
Copy link
Contributor

I think you can not set callbacks this way.
They have to passed in config during initialization

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

No branches or pull requests

3 participants