Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to enter time as 00:00:00 in DateTimePicker in mui5

  • React:18.2.0
  • mui/material: 5.10.5
  • date-fns: 2.29.3
  • date-io/date-fns: 2.16.0
  • formik: 2.2.9

I want to use DateTimePicker in my project. i want enter time this format: Hour:Minute:second
but Currently, I can only enter 00:00 Hour:Minute.
how can fix it ?
Also, I checked the mui documentation, but I didn’t find an answer.
enter image description here

I tried

<DateTimePicker
  mask="____/__/__ __:__:__"
  format="yyyy/MM/dd HH:mm:ss"
  ampm={false}
    openTo="year"
     views={[
     'year',
     'month',
     'day',
     'hours',
      'minutes',
     'seconds'
          ]}
/>

but didnt work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need to add inputFormat="yyyy/MM/dd HH:mm:ss"

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading