-
Notifications
You must be signed in to change notification settings - Fork 4.1k
ui: Allow text entry in the time selector #80655
Description
Breaking this off from #78499 and #71205 into a separate issue, to document some findings. See video at 0:57 https://www.loom.com/share/d17dc4cac1c146029b1600f30e59e79f.
The component is from the antd library, specifically this component https://ant.design/components/time-picker/

The (UTC) seems to come from the format prop, specified in our code here. This prop is not well documented in terms of what formats that it accepts. There is some documentation on formats here, but they do not describe things like The A or [] which we use in our code. I tried to dig a bit into the source code but didn't get very far.format string follows the moment library's display format string.
The current time picker behavior is such that text entry requires either
- highlighting and modifying the existing time text (instead of typing from scratch), or
- typing everything from scratch up to the final
(UTC)
In both cases, you know you've "succeeded" because the component does a smooth scroll to the time you have typed.
Changing format with s/"h:mm A [(UTC)]"/"h:mm A[ (UTC)]" does not fix the issue.
Jira issue: CRDB-15565