Skip to content

Commit

Permalink
react-native-calendars: Add missing enableSwipeMonths prop.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmunro committed Jul 28, 2020
1 parent 182b6ee commit 96d7063
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion types/react-native-calendars/index.d.ts
Expand Up @@ -311,7 +311,15 @@ export interface CalendarBaseProps {
webAriaLevel?: number;
}

export class Calendar extends React.Component<CalendarMarkingProps & CalendarBaseProps> { }
export type CalendarProps = CalendarMarkingProps &
CalendarBaseProps & {
/**
* Enable the option to swipe between months. Default = false
*/
enableSwipeMonths?: boolean;
};

export class Calendar extends React.Component<CalendarProps> {}

export interface CalendarListBaseProps extends CalendarBaseProps {
/**
Expand Down
2 changes: 2 additions & 0 deletions types/react-native-calendars/react-native-calendars-tests.tsx
Expand Up @@ -9,6 +9,8 @@ declare const Arrow: React.SFC<unknown>;
<Calendar
// Initially visible month. Default = Date()
current={'2012-03-01'}
// Enable the option to swipe between months. Default = false
enableSwipeMonths={true}
// Minimum date that can be selected, dates before minDate will be grayed out. Default = undefined
minDate={'2012-05-10'}
// Maximum date that can be selected, dates after maxDate will be grayed out. Default = undefined
Expand Down

0 comments on commit 96d7063

Please sign in to comment.