You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The config works fine when it was set at initial at time of initializing the component, But it does not work when it was set dynamically.
For example:
It works fine:
public config = {
allowInput: true,
enableTime: true,
time_24hr: false,
maxDate: new Date(),
};
Hello @finitha,
I explored the official flatpickr library and observed that the maintainers are inactive.
You can find a fork of the official flatpickr library here. I made some changes to the source code to support dynamic configuration and opened a pull request (PR), which you can track here. More information about the changes can be found in the PR description.
Describe the bug
The config works fine when it was set at initial at time of initializing the component, But it does not work when it was set dynamically.
For example:
It works fine:
public config = {
allowInput: true,
enableTime: true,
time_24hr: false,
maxDate: new Date(),
};
But this does not work:
public config;
updateConfig() {
this.config = {
allowInput: true,
enableTime: true,
time_24hr: false,
maxDate: new Date(),
}
}
Reproduction
Issue can be easily reproduced here stackblitz
Expected behavior
Flatpickr should be updated with the latest config value.
Desktop (please complete the following information):
Additional context
Any suggestions would be highly appreciated.
The text was updated successfully, but these errors were encountered: