Skip to content
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

[pickers] Cannot display time with format without spaces like "HHmm" correctly #12487

Closed
samchiu90 opened this issue Mar 19, 2024 · 2 comments · Fixed by #12489
Closed

[pickers] Cannot display time with format without spaces like "HHmm" correctly #12487

samchiu90 opened this issue Mar 19, 2024 · 2 comments · Fixed by #12489
Assignees
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition

Comments

@samchiu90
Copy link
Contributor

samchiu90 commented Mar 19, 2024

Steps to reproduce

Link to live example: (required)
https://stackblitz.com/edit/react-jjpkxw?file=Demo.tsx

Steps:

  1. Set format="HHmm" in TimeField
  2. Give it a defaultValue (15:30)

Version: 6.19.7

dayjs and TimeField are used in the example

moment and DateTimePicker also have this problem.

In #10007 and #10185 said it was fixed, but same problem on dayjs and moment

Current behavior

It displays 15m30

Expected behavior

It should display 1530

Context

Showing time with format HHmm in DateTimePicker with Moment

Your environment

No response

Search keywords: DateTimePicker TimeField HHmm format moment dayjs

@samchiu90 samchiu90 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 19, 2024
@flaviendelangle flaviendelangle self-assigned this Mar 19, 2024
@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 19, 2024
@flaviendelangle flaviendelangle changed the title [x-date-pickers] Cannot display time with format without spaces like "HHmm" correctly [pickers] Cannot display time with format without spaces like "HHmm" correctly Mar 19, 2024
@flaviendelangle
Copy link
Member

😬 The PR did not contain any test so hard to see if it worked and was broken or if it never worked.

In any case, I think the new PR solves the problem for all 4 adapters.

Copy link

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @samchiu90?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants