@@ -76,52 +76,50 @@ function CalendarEdit({
7676
7777 return (
7878 < View style = { styles . root } >
79- < View style = { styles . inner } >
80- { mode === 'single' ? (
79+ { mode === 'single' ? (
80+ < DatePickerInput
81+ inputMode = "start"
82+ ref = { dateInput }
83+ label = { label }
84+ value = { state . date }
85+ onChange = { ( date ) => onChange ( { ...state , date } ) }
86+ onSubmitEditing = { onSubmitInput }
87+ validRange = { validRange }
88+ locale = { locale }
89+ withModal = { false }
90+ autoComplete = { 'off' }
91+ />
92+ ) : null }
93+ { mode === 'range' ? (
94+ < View style = { styles . inner } >
8195 < DatePickerInput
8296 inputMode = "start"
83- ref = { dateInput }
84- label = { label }
85- value = { state . date }
86- onChange = { ( date ) => onChange ( { ...state , date } ) }
87- onSubmitEditing = { onSubmitInput }
97+ ref = { startInput }
98+ label = { startLabel }
99+ value = { state . startDate }
100+ onChange = { ( startDate ) => onChange ( { ...state , startDate } ) }
101+ returnKeyType = { 'next' }
102+ onSubmitEditing = { onSubmitStartInput }
88103 validRange = { validRange }
89104 locale = { locale }
90105 withModal = { false }
91106 autoComplete = { 'off' }
92107 />
93- ) : null }
94- { mode === 'range' ? (
95- < >
96- < DatePickerInput
97- inputMode = "start"
98- ref = { startInput }
99- label = { startLabel }
100- value = { state . startDate }
101- onChange = { ( startDate ) => onChange ( { ...state , startDate } ) }
102- returnKeyType = { 'next' }
103- onSubmitEditing = { onSubmitStartInput }
104- validRange = { validRange }
105- locale = { locale }
106- withModal = { false }
107- autoComplete = { 'off' }
108- />
109- < View style = { styles . separator } />
110- < DatePickerInput
111- inputMode = "end"
112- ref = { endInput }
113- label = { endLabel }
114- value = { state . endDate }
115- onChange = { ( endDate ) => onChange ( { ...state , endDate } ) }
116- onSubmitEditing = { onSubmitEndInput }
117- validRange = { validRange }
118- locale = { locale }
119- withModal = { false }
120- autoComplete = "off"
121- />
122- </ >
123- ) : null }
124- </ View >
108+ < View style = { styles . separator } />
109+ < DatePickerInput
110+ inputMode = "end"
111+ ref = { endInput }
112+ label = { endLabel }
113+ value = { state . endDate }
114+ onChange = { ( endDate ) => onChange ( { ...state , endDate } ) }
115+ onSubmitEditing = { onSubmitEndInput }
116+ validRange = { validRange }
117+ locale = { locale }
118+ withModal = { false }
119+ autoComplete = "off"
120+ />
121+ </ View >
122+ ) : null }
125123 </ View >
126124 )
127125}
0 commit comments