File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -113,3 +113,7 @@ Flag indicating if the time input should use the 24 hours clock. Defaults to the
113113** inputFontSize**
114114` Type: number | undefined `
115115Font size of the time input. Defaults to 57. Useful when using a custom font.
116+
117+ ** defaultInputType**
118+ ` Type: 'picker' | 'keyboard' `
119+ Which input type to use by default. Defaults to the clock-face picker.
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ export function TimePickerModal({
5757 clockIcon = 'clock-outline' ,
5858 use24HourClock,
5959 inputFontSize,
60+ defaultInputType,
6061} : {
6162 locale ?: undefined | string
6263 label ?: string
@@ -73,6 +74,7 @@ export function TimePickerModal({
7374 clockIcon ?: string
7475 use24HourClock ?: boolean
7576 inputFontSize ?: number
77+ defaultInputType ?: PossibleInputTypes
7678} ) {
7779 const theme = useTheme ( )
7880
@@ -86,7 +88,7 @@ export function TimePickerModal({
8688 }
8789
8890 const [ inputType , setInputType ] = React . useState < PossibleInputTypes > (
89- inputTypes . picker
91+ defaultInputType || inputTypes . picker
9092 )
9193 const [ focused , setFocused ] = React . useState < PossibleClockTypes > (
9294 clockTypes . hours
You can’t perform that action at this time.
0 commit comments