diff --git a/Libraries/Components/DatePicker/DatePickerIOS.ios.js b/Libraries/Components/DatePicker/DatePickerIOS.ios.js index 8df54ec3169b93..ff78c9f0fb44c3 100644 --- a/Libraries/Components/DatePicker/DatePickerIOS.ios.js +++ b/Libraries/Components/DatePicker/DatePickerIOS.ios.js @@ -8,7 +8,7 @@ * This is a controlled component version of RCTDatePickerIOS * * @format - * @flow + * @flow strict-local */ 'use strict'; @@ -21,10 +21,15 @@ const View = require('View'); const requireNativeComponent = require('requireNativeComponent'); import type {ViewProps} from 'ViewPropTypes'; +import type {SyntheticEvent} from 'CoreEventTypes'; const RCTDatePickerIOS = requireNativeComponent('RCTDatePicker'); -type Event = Object; +type Event = SyntheticEvent< + $ReadOnly<{| + timestamp: number, + |}>, +>; type Props = $ReadOnly<{| ...ViewProps, @@ -154,7 +159,11 @@ class DatePickerIOS extends React.Component { ? props.initialDate.getTime() : undefined } - locale={props.locale ? props.locale : undefined} + locale={ + props.locale != null && props.locale !== '' + ? props.locale + : undefined + } maximumDate={ props.maximumDate ? props.maximumDate.getTime() : undefined }