-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DatePicker and Calendar updates (#4143)
- Loading branch information
Showing
67 changed files
with
2,023 additions
and
1,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
"@salt-ds/lab": patch | ||
--- | ||
|
||
DatePicker and Calendar API improvements | ||
|
||
- `CalendarCarousel` has been renamed to `CarouselDateGrid` so it's more obvious of the content | ||
- `Calendar` previously used `children` to define the `CalendarNavigation`. | ||
We have now changed that so the `children` defines `CalendarNavigation`, `CalendarWeekHeader` and `CalendarDateGrid` | ||
This enables more flexibility in both layout and configuration of the `Calendar` elements. | ||
A typical Calendar will now look like this, | ||
|
||
``` | ||
<Calendar selectionVariant="single" hideOutOfRangeDates> | ||
<CalendarNavigation /> | ||
<CalendarWeekHeader /> | ||
<CalendarDateGrid /> | ||
</Calendar> | ||
``` | ||
|
||
`CalendarNavigation` - provides year/month dropdowns and forward/back controls for the visible month. | ||
`CalendarWeekHeader` - provides a header for `CalendarDateGrid` indicating the day of the week. | ||
`CalendarDateGrid` - provides a grid of buttons that represent the days from a calendar month. | ||
|
||
- cleaned up selection API, removed `select`, use `setSelectedDate` instead | ||
- fix issues with `Calendar` offset selection | ||
- updated examples, more consistent helper text, error text to match spec | ||
- test improvements to create a known state for tests and avoid failures based on locale differences | ||
- cleaned up Storybook imports in e2e tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.