mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[react-native] Added initialDate to DatePickerIOSProps (#47145)
* [react-native] Added initialDate to DatePickerIOSProps
* [react-native] Make DatePickerIOSProps.date optional
See 0b9ea60b4f/Libraries/Components/DatePicker/DatePickerIOS.ios.js (L39)
* [react-native] Allow null on DatePickerIOSProps.date and .initialDate
See flow typings
* [react-native] Fixed whitespace error
This commit is contained in:
parent
4f2ff6de9d
commit
d59b2b61a0
12
types/react-native/index.d.ts
vendored
12
types/react-native/index.d.ts
vendored
@ -2942,7 +2942,17 @@ export interface DatePickerIOSProps extends ViewProps {
|
||||
/**
|
||||
* The currently selected date.
|
||||
*/
|
||||
date: Date;
|
||||
date?: Date | null;
|
||||
|
||||
/**
|
||||
* Provides an initial value that will change when the user starts selecting
|
||||
* a date. It is useful for simple use-cases where you do not want to deal
|
||||
* with listening to events and updating the date prop to keep the
|
||||
* controlled state in sync. The controlled state has known bugs which
|
||||
* causes it to go out of sync with native. The initialDate prop is intended
|
||||
* to allow you to have native be source of truth.
|
||||
*/
|
||||
initialDate?: Date | null;
|
||||
|
||||
/**
|
||||
* The date picker locale.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user