1

I wonder if there's a way to modify whatever is the selected default minutes once I open the Clock in my KeyboardTimePicker.enter image description here

As you can see I managed to change the disabled minutes into bullets by modifying this file

@material-ui\pickers\views\Clock\ClockNumbers.js

So that users will not select them. Because what I'm building is that only the 15 minute intervals can be selected.

The problem is if the current time in minutes falls anywhere besides these numbers(00,15,30,45), for example 8:48 PM, then the clock also point to 8:48 and displays that in the time label and is selectable value once you click OK.

I need to either completely disable selecting current time in minutes as the default minutes or just round off to the nearest (00, 15, 30, 45). Is there a way I can do that? I'm not sure where to look in the files of materialUI, or maybe it can be done using props? I can leave the hour as is, only the minutes is the concern.

Olivier Tassinari
  • 8,238
  • 4
  • 23
  • 23
quielfala
  • 361
  • 4
  • 18

0 Answers0