question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline date time issues with the time in multiple mode

See original GitHub issue

I’m submitting a … (check one with “x”)

[#] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • flatPickr version : 4.1.4
  • Vue.js version : 2.5.9
  • Browser name and version : Chrome 62
  • This package version : 5.0.0

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.

bug

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ankurk91commented, Dec 20, 2017

@Chinese1904 Thanks for the detailed bug report. I found that this is a bug in flatpickr itself.

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.

screen-capture

Here is jsfiddle - http://jsfiddle.net/ankurk91/jmxcrknt/ http://jsfiddle.net/jmxcrknt/20/

0reactions
chrisbbreuercommented, Dec 20, 2017

amazing! Thanks for the fix @ankurk91 ! Appreciated a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inline date time issues with the time in multiple mode #1147
Hello,. I don't see bugs there - the time picker is not supposed to update the time on ALL dates. If you want...
Read more >
Unable to Tap Days in iOS 14 inline DatePicker - Stack Overflow
The issue I'm facing is that I can interact with the date picker by changing the month and year, but the selected day...
Read more >
Options - Flatpickr
Config Option Type Default altFormat String "F j, Y" altInput Boolean false altInputClass String ""
Read more >
Pickers - Selection and input - Human Interface Guidelines
A date picker has four modes, each of which presents a different set of selectable values. Date — Displays months, days of the...
Read more >
<input type="datetime-local"> - HTML - MDN Web Docs
Another option is to use separate date and time inputs, each of which is more widely supported than datetime-local . Some browsers may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found