feat: Add 24h view for time picker#3506
Merged
Merged
Conversation
ronaktruss
commented
Jun 16, 2026
| export const TIME_PICKER_CUSTOM_FILTER_24H: CustomizableFilter = { | ||
| filter: '0?{{ hourQueryFilter }}:{{ minuteQueryFilter }}.*', | ||
| extras: { | ||
| hourQueryFilter: '([0-9]{1,2})', |
Contributor
Author
There was a problem hiding this comment.
We could have more specific regex here, but made it as similar to the other TIME_PICKER_CUSTOM_FILTER so that they behave as similar as possible.
Contributor
There was a problem hiding this comment.
I think that's the right move. I haven't double checked, but I'm fairly certain a lot of these supporting constants and logic are lifted almost 1:1 from USWDS, so keeping it "similar" is exactly the right call.
brandonlenz
approved these changes
Jun 17, 2026
brandonlenz
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the storybook example! Made it easy to test.
This was a nice, surgical change. Thanks!
brandonlenz
reviewed
Jun 17, 2026
Contributor
|
@all-contributors please add @ronaktruss for code |
Contributor
|
I've put up a pull request to add @ronaktruss! 🎉 |
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.
Summary
Adds optional property to enable military time
Related Issues or PRs
#2947
How To Test
Look at time picker in storybook and review the 24h option.
Screenshots (optional)
Author & Maintainer checklist