Skip to content

ui: Allow text entry in the time selector #80655

@jocrl

Description

@jocrl

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/
image

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 A or [] which we use in our code. I tried to dig a bit into the source code but didn't get very far. The 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

Metadata

Metadata

Assignees

Labels

A-sql-console-generalSQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud ConsoleC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions