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
{{ message }}
This repository was archived by the owner on May 19, 2025. It is now read-only.
-`showPreview` prop added to control visibility of preview. Default value is `true`.
128
+
-`preview` prop added: It displays a preview range and overwrite DateRange's default preview. You can set a controlled preview with below shape of object.
129
+
```js
130
+
{
131
+
startDate: [DateObject] ||null,
132
+
endDate: [DateObject] ||null,
133
+
color:'#fed14c',
134
+
}
135
+
```
136
+
-`onPreviewChange(date)` prop added: Callback function for preview changes. You can set controlled custom previews with `preview` prop.
137
+
-`focusedRange` prop added: It defines which range and step are focused. Common initial value is `[0, 0]`; first value is index of ranges, second value is which step on date range(startDate or endDate).
138
+
-`initialFocusedRange` prop added: Initial value for focused range. See `focusedRange` for usage.
139
+
-`onRangeFocusChange` prop added: Callback function for focus changes by user.
dateDisplayFormat(DateRange) | String | `MMM D,YYYY` | selected range preview formatter. checkout [date-fns's format option](https://date-fns.org/v2.0.0-alpha.7/docs/format)
121
+
initialFocusedRange(DateRange) | Object | | Initial value for focused range. See `focusedRange` for usage.
122
+
focusedRange(DateRange) | Object | | It defines which range and step are focused. Common initial value is `[0, 0]`; first value is index of ranges, second one is which step on date range(startDate or endDate).
123
+
onRangeFocusChange(DateRange) | Object | | Callback function for focus changes by user
124
+
preview(DateRange) | Object | | displays a preview range and overwrite DateRange's default preview. Expected shape: `{ startDate: Date, endDate: Date, color: String }`
125
+
showPreview(DateRange) | bool | true | visibility of preview
126
+
onPreviewChange(DateRange) | Object | | Callback function for preview changes
127
+
dateDisplayFormat(DateRange) | String | `MMM D, YYYY` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/v2.0.0-alpha.7/docs/format)
To enable infinite scroll set `scroll={{enabled: true}}` basically. Infinite scroll feature is affected by `direction`(rendering direction for months) and `months`(for rendered months count) props directly.
142
-
If you prefer, you can overwrite calendar sizes with `calendarWidth`/`calendarHeight` or each month's height/withs with `monthWidth`/`monthHeight`/`longMonthHeight` at `scroll` prop.
147
+
To enable infinite scroll set `scroll={{enabled: true}}` basically. Infinite scroll feature is affected by `direction`(rendering direction for months) and `months`(for rendered months count) props directly.
148
+
If you prefer, you can overwrite calendar sizes with `calendarWidth`/`calendarHeight` or each month's height/withs with `monthWidth`/`monthHeight`/`longMonthHeight` at `scroll` prop.
0 commit comments