Disable past hour in Material UI DateTimePicker

Viewed 3096

Is there any way I can disable selecting the past hour in DateTimePicker https://material-ui-pickers.dev/api/DateTimePicker I am using disablePast but seems like it is disabling the past dates but you can select past hour for current date.

Appreciate the help.

1 Answers

Ciao, yes you are right, on DateTimePicker there is disablePast to disable past dates but not past time. Look this, someone asked to add minTime prop in DateTimePicker to disable past time but there isn't any update on this topic.

The only thing you can do is validate time by yourself like this guy have done.

Related