You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the list of all the props you can pass to the component so that you can customize it:
96
96
###### Initial data and onDateSelected handler
97
-
* startingDate: React.PropTypes.any - Date to be used for centering the calendar/showing the week based on that date. It is internaly wrapped by `moment` so it accepts both `Date` and `moment Date`.
98
-
* selectedDate: React.PropTypes.any - Date to be used as pre selected Date. It is internaly wrapped by `moment` so it accepts both `Date` and `moment Date`.
99
-
* onDateSelected: React.PropTypes.func - Function to be used as a callback when a date is selected. It returns `moment Date`
100
-
* onWeekChanged: React.PropTypes.func - Function to be used as a callback when a week is changed. It returns `moment Date`
101
-
* useIsoWeekday: React.PropTypes.bool - start week on ISO day of week (default true). If false, starts week on _startingDate_ parameter.
102
-
* minDate: React.PropTypes.any - minimum date that the calendar may navigate to. A week is allowed if minDate falls within the current week.
103
-
* maxDate: React.PropTypes.any - maximum date that the calendar may navigate to. A week is allowed if maxDate falls within the current week.
104
-
* datesWhitelist: React.PropTypes.array - Dates that are enabled (accepts both `Date` and `moment Date`). Ranges may be specified with an object entry in the array:
97
+
* startingDate: PropTypes.any - Date to be used for centering the calendar/showing the week based on that date. It is internaly wrapped by `moment` so it accepts both `Date` and `moment Date`.
98
+
* selectedDate: PropTypes.any - Date to be used as pre selected Date. It is internaly wrapped by `moment` so it accepts both `Date` and `moment Date`.
99
+
* onDateSelected: PropTypes.func - Function to be used as a callback when a date is selected. It returns `moment Date`
100
+
* onWeekChanged: PropTypes.func - Function to be used as a callback when a week is changed. It returns `moment Date`
101
+
* useIsoWeekday: PropTypes.bool - start week on ISO day of week (default true). If false, starts week on _startingDate_ parameter.
102
+
* minDate: PropTypes.any - minimum date that the calendar may navigate to. A week is allowed if minDate falls within the current week.
103
+
* maxDate: PropTypes.any - maximum date that the calendar may navigate to. A week is allowed if maxDate falls within the current week.
104
+
* datesWhitelist: PropTypes.array - Dates that are enabled (accepts both `Date` and `moment Date`). Ranges may be specified with an object entry in the array:
105
105
```
106
106
// Date range format
107
107
{
@@ -110,44 +110,44 @@ This is the list of all the props you can pass to the component so that you can
110
110
}
111
111
```
112
112
This may be overridden by _datesBlacklist_.
113
-
* datesBlacklist: React.PropTypes.array - Dates that are disabled. Same format as _datesWhitelist_. This overrides dates in _datesWhitelist_.
113
+
* datesBlacklist: PropTypes.array - Dates that are disabled. Same format as _datesWhitelist_. This overrides dates in _datesWhitelist_.
114
114
115
115
###### Show or hide components
116
-
* showMonth: React.PropTypes.bool - Show (default true) or hide (false) the month label.
117
-
* showDate: React.PropTypes.bool - Show (default true) or hide (false) all the dates.
118
-
* showDayName: React.PropTypes.bool - Show (default true) or hide (false) the day name label.
119
-
* showDayNumber: React.PropTypes.bool - Show (default true) or hide (false) the day number label.
116
+
* showMonth: PropTypes.bool - Show (default true) or hide (false) the month label.
117
+
* showDate: PropTypes.bool - Show (default true) or hide (false) all the dates.
118
+
* showDayName: PropTypes.bool - Show (default true) or hide (false) the day name label.
119
+
* showDayNumber: PropTypes.bool - Show (default true) or hide (false) the day number label.
120
120
121
121
###### Top level style
122
-
* style: React.PropTypes.any - Style for the top level CalendarStrip component
122
+
* style: PropTypes.any - Style for the top level CalendarStrip component
123
123
124
124
###### Icon
125
-
* iconLeft: React.PropTypes.any - Icon to be used for the left icon. It accepts require statement with url to the image (`require('./img/icon.png')`), or object with remote uri `{uri: 'http://example.com/image.png'}`
126
-
* iconRight: React.PropTypes.any - Icon to be used for the right icon. It accepts require statement with url to the image (`require('./img/icon.png')`), or object with remote uri `{uri: 'http://example.com/image.png'}`
127
-
* iconStyle: React.PropTypes.any - Style that is applied to both left and right icons. It is applied before *iconLeftStyle* or *iconLeftStyle*.
128
-
* iconLeftStyle: React.PropTypes.any - Style for left icon. It will override all of the other styles applied to icons.
129
-
* iconRightStyle: React.PropTypes.any - Style for right icon. It will override all of the other styles applied to icons.
130
-
* iconContainer: React.PropTypes.any - Style for the container of icons. (Example usage is to add `flex` property to it so in the portrait mode, it will shrink the dates strip)
131
-
* leftSelector: React.PropTypes.any - Component for the left selector control. May be an instance of any React component. This overrides the icon* props above. Passing in an empty array `[]` hides this control.
132
-
* rightSelector: React.PropTypes.any - same as above but for the right selector control.
125
+
* iconLeft: PropTypes.any - Icon to be used for the left icon. It accepts require statement with url to the image (`require('./img/icon.png')`), or object with remote uri `{uri: 'http://example.com/image.png'}`
126
+
* iconRight: PropTypes.any - Icon to be used for the right icon. It accepts require statement with url to the image (`require('./img/icon.png')`), or object with remote uri `{uri: 'http://example.com/image.png'}`
127
+
* iconStyle: PropTypes.any - Style that is applied to both left and right icons. It is applied before *iconLeftStyle* or *iconLeftStyle*.
128
+
* iconLeftStyle: PropTypes.any - Style for left icon. It will override all of the other styles applied to icons.
129
+
* iconRightStyle: PropTypes.any - Style for right icon. It will override all of the other styles applied to icons.
130
+
* iconContainer: PropTypes.any - Style for the container of icons. (Example usage is to add `flex` property to it so in the portrait mode, it will shrink the dates strip)
131
+
* leftSelector: PropTypes.any - Component for the left selector control. May be an instance of any React component. This overrides the icon* props above. Passing in an empty array `[]` hides this control.
132
+
* rightSelector: PropTypes.any - same as above but for the right selector control.
133
133
134
134
###### Header style and formatting
135
-
* calendarHeaderStyle: React.PropTypes.any - Style for the header text of the calendar.
136
-
* calendarHeaderFormat: React.PropTypes.string - Format for the header text of the calendar. For options, refere to [moments documentation](http://momentjs.com/docs/#/displaying/format/)
135
+
* calendarHeaderStyle: PropTypes.any - Style for the header text of the calendar.
136
+
* calendarHeaderFormat: PropTypes.string - Format for the header text of the calendar. For options, refere to [moments documentation](http://momentjs.com/docs/#/displaying/format/)
137
137
138
138
###### Date name and number styling
139
-
* dateNameStyle: React.PropTypes.any - Style for the name of the day on work days in dates strip.
140
-
* dateNumberStyle: React.PropTypes.any - Style for the number of the day on work days in dates strip.
141
-
* weekendDateNameStyle: React.PropTypes.any - Style for the name of the day on weekend days in dates strip.
142
-
* weekendDateNumberStyle: React.PropTypes.any - Style for the number of the day on weekend days in dates strip.
* type: `border` or `background`. 'border' animates a circular border around a date. 'background' animates the background of the date.
202
202
* duration: duration of animation in milliseconds.
203
-
* borderWidth: React.PropTypes.number - Selected day's border width. Required if the type is set to _border_.
204
-
* borderHighlightColor: React.PropTypes.string - Selected day's border color. Required if the type is set to _border_.
205
-
* highlightColor: React.PropTypes.string - Highlighted color of selected date. Required if the type is set to _background_.
203
+
* borderWidth: PropTypes.number - Selected day's border width. Required if the type is set to _border_.
204
+
* borderHighlightColor: PropTypes.string - Selected day's border color. Required if the type is set to _border_.
205
+
* highlightColor: PropTypes.string - Highlighted color of selected date. Required if the type is set to _background_.
206
206
* animType, animUpdateType, animProperty, and animSpringDamping are optional config options passed to [LayoutAnimation](https://facebook.github.io/react-native/docs/layoutanimation.html)
If you chose the `background` type of animation, the selected date will animate the circular background color from `calendarColor` to `daySelectionAnimation.highlightColor`. That is why, when this type is chosen, you have to define both of these colors.
213
-
* calendarColor: React.PropTypes.string - Background color of the whole calendar strip. `!important` This is also the color of the circular background of the date so that highlighting the date will appear 'from background'. The top level style of this component can override this property.
213
+
* calendarColor: PropTypes.string - Background color of the whole calendar strip. `!important` This is also the color of the circular background of the date so that highlighting the date will appear 'from background'. The top level style of this component can override this property.
* locale: React.PropTypes.object - Locale for dates
220
+
* locale: PropTypes.object - Locale for dates
221
221
222
222
This prop is used for adding localization to react-native-calendar-strip component. The localization rules are the same as moments and can be found in [moments documentation](http://momentjs.com/docs/#/i18n/)
0 commit comments