Skip to content

Commit 8083f00

Browse files
ToMESSKagit-nandor
authored andcommitted
feat(ui-select,ui-date-time-input): rework DateTimeInput and replace DateInput v1 with DateInput v2 in DateTimeInput
BREAKING CHANGE: renderWeekdayLabels` prop removed `calendarIcon` is a new required prop INSTUI-4791
1 parent 5a9405c commit 8083f00

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

docs/guides/upgrade-guide.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,38 @@ type: embed
470470

471471
```
472472

473+
#### DateTimeInput v1 → v2 API changes
474+
475+
**Removed props:**
476+
477+
| Removed prop | Replacement |
478+
| --------------------- | -------------------------------- |
479+
| `renderWeekdayLabels` | Built in — no replacement needed |
480+
481+
**New props in v2:**
482+
483+
| New prop | Description |
484+
| ------------------ | ------------------------------------------------------------------------------------------ |
485+
| `calendarIcon` | **Required.** Screen reader label for the calendar icon button that opens the date picker. |
486+
| `datePickerDialog` | Optional. Screen reader label for the date picker dialog. |
487+
| `withYearPicker` | Optional. Enables a year dropdown in the calendar. |
488+
489+
```jsx
490+
// v1
491+
<DateTimeInput
492+
prevMonthLabel="Previous month"
493+
nextMonthLabel="Next month"
494+
/>
495+
496+
// v2
497+
<DateTimeInput
498+
prevMonthLabel="Previous month"
499+
nextMonthLabel="Next month"
500+
calendarIcon="Open calendar"
501+
datePickerDialog="Date picker" // optional
502+
/>
503+
```
504+
473505
### ColorPicker
474506

475507
```js

0 commit comments

Comments
 (0)