Commit 33d5b52 1 parent 6a1c904 commit 33d5b52 Copy full SHA for 33d5b52
File tree 1 file changed +12
-3
lines changed
Libraries/Components/DatePicker
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 8
8
* This is a controlled component version of RCTDatePickerIOS
9
9
*
10
10
* @format
11
- * @flow
11
+ * @flow strict-local
12
12
*/
13
13
14
14
'use strict' ;
@@ -21,10 +21,15 @@ const View = require('View');
21
21
const requireNativeComponent = require ( 'requireNativeComponent' ) ;
22
22
23
23
import type { ViewProps } from 'ViewPropTypes' ;
24
+ import type { SyntheticEvent } from 'CoreEventTypes' ;
24
25
25
26
const RCTDatePickerIOS = requireNativeComponent ( 'RCTDatePicker' ) ;
26
27
27
- type Event = Object ;
28
+ type Event = SyntheticEvent <
29
+ $ReadOnly < { |
30
+ timestamp : number ,
31
+ | } > ,
32
+ > ;
28
33
29
34
type Props = $ReadOnly < { |
30
35
...ViewProps ,
@@ -154,7 +159,11 @@ class DatePickerIOS extends React.Component<Props> {
154
159
? props . initialDate . getTime ( )
155
160
: undefined
156
161
}
157
- locale = { props . locale ? props . locale : undefined }
162
+ locale = {
163
+ props . locale != null && props . locale !== ''
164
+ ? props . locale
165
+ : undefined
166
+ }
158
167
maximumDate = {
159
168
props . maximumDate ? props . maximumDate . getTime ( ) : undefined
160
169
}
You can’t perform that action at this time.
0 commit comments