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
Copy file name to clipboardExpand all lines: src/components/Calendar/README.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,7 @@ LANDING_BLOCK-->
150
150
151
151
## Focused value
152
152
153
-
Allows to select the date that `Calendar` view is focused on. If you need it to be controlled you shoud use `focusedValue` prop. You can set the initial focused value for uncontrolled component with optional prop `defaultFocusedValue`.
153
+
Allows to select the date that `Calendar` view is focused on. If you need it to be controlled you should use `focusedValue` prop. You can set the initial focused value for uncontrolled component with optional prop `defaultFocusedValue`.
154
154
155
155
<!--LANDING_BLOCK
156
156
<ExampleBlock
@@ -170,6 +170,28 @@ LANDING_BLOCK-->
170
170
171
171
<!--/GITHUB_BLOCK-->
172
172
173
+
## Multiple selection
174
+
175
+
Set the `selectionMode="multiple"` prop to enable the user to select multiple dates. When multiple selection is enabled, the value prop should be an array of dates instead of a single date, and onChange will be called with an array.
`timeZone` is the property to set the time zone of the value in the input. [Learn more about time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
@@ -194,7 +216,7 @@ LANDING_BLOCK-->
194
216
| isWeekend | Callback that is called for each date of the calendar. If it returns true, then the date is weekend. |`((date: DateTime) => boolean)`||
195
217
|[maxValue](#min-and-max-value)| The maximum allowed date that a user may select. |`DateTime`||
196
218
|[minValue](#min-and-max-value)| The minimum allowed date that a user may select. |`DateTime`||
197
-
|[mode](#mode)| Defines the time interval that `Calendar` should display in colttrolled way. |`days``months``quarters``years`||
219
+
|[mode](#mode)| Defines the time interval that `Calendar` should display in controlled way.|`days``months``quarters``years`||
198
220
| modes | Modes available to user |`Partial<Record<CalendarLayout, boolean>>`|`{days: true, months: true, quarters: false, years: true }`|
199
221
| onBlur | Fires when the control lost focus. Provides focus event as a callback's argument |`((e: FocusEvent<Element, Element>) => void)`||
200
222
| onFocus | Fires when the control gets focus. Provides focus event as a callback's argument |`((e: FocusEvent<Element, Element>) => void)`||
@@ -203,6 +225,7 @@ LANDING_BLOCK-->
203
225
| onUpdateMode | Fires when the mode is changed. |`((value: 'days' \| 'months' \| 'quarters' \| 'years' ) => void`||
204
226
|[readOnly](#readonly)| Whether the calendar value is immutable. |`boolean`|`false`|
205
227
|[size](#size)| The size of the control |`"m"``"l"``"xl"`|`"m"`|
228
+
| selectionMode | Whether single or multiple selection is enabled. |`'single' \| 'multiple'`|`'single'`|
206
229
| style | Sets inline style for the element. |`CSSProperties`||
207
230
|[timeZone](#time-zone)| Sets the time zone. [Learn more about time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)|`string`||
208
231
|[value](#calendar)| The value of the control |`DateTime``null`||
0 commit comments