Closed harrington101 closed 3 years ago
I believe the behavior is correct now.
autoApply
is false
so we only preselect dates without selected them.
It may be necessary to add another option for ranges
or add some kind of event on preselection.
For example with event:
picker.on('ranges:preselect', (d1, d2) => {
picker.setDateRange(d1, d2);
picker.hide();
})
Suggestions are welcome.
Yes. Or possibly add an option such as "autoApplyRange: true|false". Then autoApply will only apply to the selecting of individual dates.
I think nothing is in the way to add both things. I will add a new option and events in the next release.
v2.0.10 Added a new option: https://litepicker.com/docs/plugins/ranges/#autoapply-2010
Describe the bug I updated to version 2.0.9 from 1.x. When clicking on a range the calendar changes but the apply is no longer automatic. I have autoApply set to false when it is a date range. Previously, with this setting when the user clicked around the calendar it wouldn't automatically apply the dates until they clicked the apply button but if they clicked a predefined range it would still auto apply. Now it seems there is no way to have this behavior.
To Reproduce Steps to reproduce the behavior:
Expected behavior The user can click several dates without auto apply but if they click a range button auto apply happens.