{{ message }}
Repository navigation
Conversation
…#3144) Native time inputs report their value without zero seconds ("01:05"), but every change event made flatpickr write it back as "01:05:00". Chrome treats that as a new value and resets the field being edited, so typing "15" into a prefilled hour ended up as 05. Skip the write when the native input already holds the same date. Fixes flatpickr#3144 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #3144
On mobile, flatpickr writes the selected date back into the native time input on every change. Browsers report the value without zero seconds (
01:05), but flatpickr writes01:05:00, and Chrome treats that as a new value and resets the field you're typing in, so typing "15" into a prefilled hour ends up as 05.This skips the write when the native input already holds the same date. Setting the date from code (
setDate(),clear()) still updates it.I tried the steps from the issue in Chromium with Android emulation (15:05 now, 05:05:00 before) and added a test that fails on master. CI is currently cancelled on PRs because of the retired ubuntu-20.04 runner (#3141 fixes that), so I ran
npm testand the prettier check locally.I used Claude Code to write this change.