Skip to content

Commit 58707a6

Browse files
authored
chore(datepicker) add hover styles (#4664)
* chore(datepicker): add new states, add tests, fix a11y issue with table, adjust storybook example height for VRT * chore(date and time pickers): add required and error states, tests * chore(datepicker) add hover styles * chore(datepicker) Jesse is right about deprecation
1 parent 78eeb32 commit 58707a6

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

RELEASENOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
### [Datepickers](https://www.lightningdesignsystem.com/components/datepickers)
1616
#### Added
1717
- Added examples for Required, Required with Error states
18+
- Added hover style for dates
1819
- Added `aria-label` to provide the full `DD MM YYYY` text of the date
1920
#### Fixed
2021
- Fixed missing attribute `aria-current="date"` when today's date falls inside of a selected range
2122

2223
### [Datetime Picker](https://www.lightningdesignsystem.com/components/datetime-picker)
2324
#### Added
2425
- Added `aria-label` to provide the full `DD MM YYYY` text of the date
26+
2527
#### Changed
2628
- Removed the usage of the deprecated combobox. The Datetime Picker now uses the current combobox.
2729

ui/components/datepickers/RELEASENOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Added
1010

1111
- Added examples for Required, Required with Error states
12+
- Added hover style for dates
1213
- Added `aria-label` to provide the full `DD MM YYYY` text of the date
1314

1415
### Fixed

ui/components/datepickers/base/_deprecate.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,16 @@
1111
.slds-disabled-text {
1212
color: $color-text-button-default-disabled;
1313
}
14+
15+
.slds-datepicker {
16+
17+
td {
18+
19+
&:hover:not(.slds-disabled-text) > .slds-day,
20+
&:focus:not(.slds-disabled-text) > .slds-day,
21+
&.slds-is-today > .slds-day {
22+
cursor: pointer;
23+
}
24+
}
25+
}
1426
}

ui/components/datepickers/base/_index.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
* @selector .slds-is-today
5454
* @restrict .slds-datepicker td
5555
*/
56-
&:hover:not(.slds-disabled-text) > .slds-day,
57-
&:focus:not(.slds-disabled-text) > .slds-day,
56+
&:hover > .slds-day,
57+
&:focus > .slds-day,
5858
&.slds-is-today > .slds-day {
5959
cursor: pointer;
6060
}
@@ -71,6 +71,13 @@
7171
}
7272
}
7373

74+
&:hover {
75+
76+
> .slds-day {
77+
background-color: $color-background-row-hover;
78+
}
79+
}
80+
7481
/**
7582
* @summary Indicates selected days
7683
*

ui/components/datetime-picker/RELEASENOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
- Added `aria-label` to provide the full `DD MM YYYY` text of the date
1111

12+
### Added
13+
14+
- Added hover style for dates
15+
1216
### Changed
1317

1418
- Removed the usage of the deprecated combobox. The Datetime Picker now uses the current combobox.

0 commit comments

Comments
 (0)