Skip to content

feat: milliseconds support#2870

Closed
Aditya-ds-1806 wants to merge 9 commits intoflatpickr:masterfrom
Aditya-ds-1806:feat/milliseconds-support
Closed

feat: milliseconds support#2870
Aditya-ds-1806 wants to merge 9 commits intoflatpickr:masterfrom
Aditya-ds-1806:feat/milliseconds-support

Conversation

@Aditya-ds-1806
Copy link
Copy Markdown

This is an initial draft PR for the millisecond feature #1361. Would love to get your feedback on this up to this point.

@mvorisek
Copy link
Copy Markdown

@Aditya-ds-1806 as discussed in #1361 (comment) and #2520 (comment) at least nanosecond resolution should be supported, this PR should aim to provide general "fractional seconds" support

@Aditya-ds-1806
Copy link
Copy Markdown
Author

Got it, so you want me to increase the precision to 9 and preferably users should be able to configure it. Will try to push the changes in a few hours!

@Aditya-ds-1806
Copy link
Copy Markdown
Author

are the input elements configured to display a maximum of 4 digits somewhere? input.value.length doesnt go beyond 4 at all for some reason @mvorisek

@mvorisek
Copy link
Copy Markdown

4 digits? If you can get beyond 3 digits it should be not because of Date having only 3 digits/milli resolution - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date.

Please add tests and push the changes.

@Aditya-ds-1806
Copy link
Copy Markdown
Author

@mvorisek In that case should we leave it to the users to figure out how they want to format the millisecond input via the formatDate field? I have pushed the changes, please let me know

@radu-cs
Copy link
Copy Markdown

radu-cs commented Feb 23, 2024

Looking forward for this pull request to be merged.

@mvorisek
Copy link
Copy Markdown

This PR should be closed in favor of #2910 which added generic fractional seconds support.

@Aditya-ds-1806 Aditya-ds-1806 closed this by deleting the head repository Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants