🤖 Merge PR #64549 [react-native-calendar-picker] Add initialView prop to CalendarPickerProps (v7.1.4) by @dmarcucci

* Add new initialView prop for react-native-calendar-picker

* Add new test for initialView prop
This commit is contained in:
Daniel Marcucci
2023-03-02 10:42:00 -05:00
committed by GitHub
parent 726ce6a1e3
commit c5be99899b
2 changed files with 12 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ export interface CalendarPickerProps {
monthTitleStyle?: StyleProp<TextStyle> | undefined;
yearTitleStyle?: StyleProp<TextStyle> | undefined;
customDayHeaderStyles?: CustomDayHeaderStylesFunc | undefined;
initialView?: 'years' | 'months' | 'days' | undefined;
}
export type DayOfWeekStyle = {

View File

@@ -192,3 +192,14 @@ const TestDayOfWeekStyles = () => {
const TestCustomComponents = () => {
return <CalendarPicker nextComponent={<View></View>} previousComponent={[<TextInput />]} />;
};
const TestInitialViewValues = () => {
return (
<>
<CalendarPicker initialView={"days"} />
<CalendarPicker initialView={"months"} />
<CalendarPicker initialView={"years"} />
<CalendarPicker initialView={undefined} />
</>
);
};