Closed spaske1991 closed 4 months ago
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch react-native-ui-datepicker@1.0.11 for the project I'm working on.
react-native-ui-datepicker@1.0.11
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-ui-datepicker/src/DateTimePicker.tsx b/node_modules/react-native-ui-datepicker/src/DateTimePicker.tsx index 5a55cf2..3958bdd 100644 --- a/node_modules/react-native-ui-datepicker/src/DateTimePicker.tsx +++ b/node_modules/react-native-ui-datepicker/src/DateTimePicker.tsx @@ -137,7 +137,7 @@ const DateTimePicker = ({ useEffect(() => { dispatch({ type: CalendarActionKind.SET_CALENDAR_VIEW, - payload: mode === 'time' ? CalendarViews.time : CalendarViews.day, + payload: mode === 'time' ? CalendarViews.time : mode === 'year' ? CalendarViews.year : mode ==='month' ? CalendarViews.month : CalendarViews.day , }); }, [mode]); diff --git a/node_modules/react-native-ui-datepicker/src/types.ts b/node_modules/react-native-ui-datepicker/src/types.ts index 7783b3f..4229093 100644 --- a/node_modules/react-native-ui-datepicker/src/types.ts +++ b/node_modules/react-native-ui-datepicker/src/types.ts @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; export type DateType = string | number | Dayjs | Date | null | undefined; -export type CalendarModes = 'datetime' | 'date' | 'time'; +export type CalendarModes = 'datetime' | 'date' | 'time' | 'month' | 'year'; export type HeaderButtonPositions = 'around' | 'right' | 'left';
This issue body was partially generated by patch-package.
this is fixed in this commit 653daa8
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
react-native-ui-datepicker@1.0.11
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.