Reputation: 331
I am currently working on a React app together with Formik that requires the use date and time pickers. I am building the app using Material-UI and have been looking at Material-UI Pickers over at https://material-ui-pickers.dev/
Since I am new to React/Formik/Material-UI, I have the following questions:
Is it possible to use Material-UI Pickers together with Formik as I need to maintain state of all dates/time provided by user?
When it comes to the user input for both dates and times, I have a case when the user needs to enter both a date as well as time but in 24 hours format and also need to include seconds, i.e.
the format that I am after is: DD/MM/YYYY HH24:MI:SS
Is this possible with Material-UI Pickers as from what I could see in there demo, I didn't see the capability to add seconds?
HH24:MI:SS
I guess my main concern is, how do I allow a user to also provide the seconds SS
as this is required?
Upvotes: 1
Views: 3485
Reputation: 2194
Best Way to do it is using DatePicker(For setting dates) and Timepicker(Provides seconds feature also along with hour and min setting) both seperately , You can use Material UI Pickers with Formik , I have put it in a sandbox , you can refer it for implementing
Upvotes: 2