-
Notifications
You must be signed in to change notification settings - Fork 101
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
Inline date time issues with the time in multiple mode #44
Comments
@Chinese1904 Here is an example in plain js <input type='text' id="flatpickr" /> var fp = flatpickr(document.querySelector('#flatpickr'), {
altFormat: "F j, Y",
altInput: true,
inline: true,
enableTime: true,
mode: "multiple",
onChange: function(selectedDates, dateStr, instance) {
console.log('date: ', dateStr);
}
}); You will notice that flatpickr is not updating time on all dates. Here is jsfiddle - |
@ankurk91 now that I look at it more closely, it seems that the behavior is correct in what you display, but just not with the Vue component chmln reported back as well saying it doesn't appear to be a bug. Any ideas? |
The Vue component is updating v-model value same as returned from flatpickr and i want to keep the behaviour same. |
Hi @ankurk91 I think I kindly have to disagree here. The behavior is different from Flatpickr to your Vue wrapper. Flatpickr will change the last selected date's time if I change the time after I added dates. Which is the correct behavior. Your Vue wrapper will change the date's time of the earliest selected date. Which is not very intuitive nor handy because if I change the time after I added dates already, I want to change the last selected date and ongoing selections. |
I see, I will look into it. |
Thanks a lot @ankurk91 |
@Chinese1904 |
amazing! Thanks for the fix @ankurk91 ! Appreciated a lot! |
I'm submitting a ... (check one with "x")
Tell about your platform
Current behavior
If you inline flatpickr and enable the time and multi multiple mode, you will realize that it is not as intuitive changing the time and it the first chosen time (earliest date) is the one that will be reactive always.
Expected behavior
the latest chosen date time should be reactive.
Minimal reproduction of the problem with instructions
https://jsfiddle.net/63kzdwLx/99/
I would truly appreciate any advice as how I can workaround this bug or any help on fixing it would be amazing!
Thanks so much for this great component.
The text was updated successfully, but these errors were encountered: