Skip to content

fix(ui): clear miliseconds in date fields unless theyre explicitly provided in the display format #12650

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

Conversation

paulpopus
Copy link
Contributor

Fixes #12532

Normally we clear any values when picking a date such that your hour, minutes and seconds are normalised to 0 unless specified. Equally when you specify a time we will normalise seconds so that only minutes are relevant as configured.

Miliseconds were never removed from the actual date value and whatever milisecond the editor was in was that value that was being added. There's this abandoned issue from the UI library react-datepicker as it's not something configurable.

This fixes that problem by making sure that miliseconds are always 0 unless the displayFormat includes SSS as an intention to show and customise them.

This also caused issues with scheduled jobs if things were slightly out of order or not being scheduled in the expected time interval.

@paulpopus paulpopus changed the title fix(ui): clear miliseconds unless theyre explicitly provided in the display format fix(ui): clear miliseconds in date fields unless theyre explicitly provided in the display format Jun 2, 2025
@jessrynkar jessrynkar self-requested a review June 3, 2025 09:41
Copy link
Member

@jessrynkar jessrynkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paulpopus paulpopus merged commit a9ff375 into main Jun 3, 2025
305 of 311 checks passed
@paulpopus paulpopus deleted the fix/ui-clear-miliseconds-unless-theyre-explicitly-provided-in-the-display-format branch June 3, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date fields always include milliseconds even when seconds default to zero
2 participants