Skip to content

Commit 0fbb2c0

Browse files
[UIK-3609][date-picker] fixed space issues (#2534)
<!--- Provide a general summary of your changes in the Title above --> ## Motivation and Context Pressing `Space` in the `Date Picker` does not switch months, apply “Today” and save chosen date. The fix restores correct Space key behavior for these interactions. ## How has this been tested? Manually ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue). - [ ] New feature (non-breaking change which adds functionality). - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). - [ ] Nice improve. ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have updated the documentation accordingly. - [x] I have added changelog note to corresponding `CHANGELOG.md` file with planned publish date. - [ ] I have added new tests on added of fixed functionality. --------- Co-authored-by: Valeria-Zimnitskaya <[email protected]>
1 parent 6df0259 commit 0fbb2c0

File tree

184 files changed

+3548
-3929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+3548
-3929
lines changed

semcore/date-picker/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
44

5+
## [16.2.2] - 2025-11-10
6+
7+
### Fixed
8+
9+
- Space key interactions in Date Picker (unable to switch months, apply Today, keep selected date, etc.)
10+
511
## [16.2.1] - 2025-10-29
612

713
### Changed
Binary file not shown.

semcore/date-picker/__tests__/date-picker.axe-test.tsx

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import { e2eStandToHtml } from '@semcore/testing-utils/e2e-stand';
21
import { expect, getAccessibilityViolations, test } from '@semcore/testing-utils/playwright';
2+
import { loadPage } from '@semcore/testing-utils/shared/helpers';
3+
import { TAG } from '@semcore/testing-utils/shared/tags';
34

4-
test.describe('DatePicker', () => {
5+
test.describe(`@date-picker ${TAG.ACCESSIBILITY}`, () => {
56
test('Single date', async ({ page }) => {
6-
const standPath = 'stories/components/date-picker/docs/examples/datepicker.tsx';
7-
const htmlContent = await e2eStandToHtml(standPath, 'en');
8-
9-
await page.setContent(htmlContent);
7+
await loadPage(page, 'stories/components/date-picker/docs/examples/datepicker.tsx', 'en');
108

119
// base check
1210
{
@@ -27,10 +25,7 @@ test.describe('DatePicker', () => {
2725
});
2826

2927
test('Custom date range', async ({ page }) => {
30-
const standPath = 'stories/components/date-picker/docs/examples/custom_date_ranges.tsx';
31-
const htmlContent = await e2eStandToHtml(standPath, 'en');
32-
33-
await page.setContent(htmlContent);
28+
await loadPage(page, 'stories/components/date-picker/docs/examples/custom_date_ranges.tsx', 'en');
3429

3530
// base check
3631
{
@@ -51,10 +46,7 @@ test.describe('DatePicker', () => {
5146
});
5247

5348
test('Custom day', async ({ page }) => {
54-
const standPath = 'stories/components/date-picker/docs/examples/custom_day.tsx';
55-
const htmlContent = await e2eStandToHtml(standPath, 'en');
56-
57-
await page.setContent(htmlContent);
49+
await loadPage(page, 'stories/components/date-picker/docs/examples/custom_day.tsx', 'en');
5850

5951
// base check
6052
{
@@ -75,10 +67,7 @@ test.describe('DatePicker', () => {
7567
});
7668

7769
test('Custom header', async ({ page }) => {
78-
const standPath = 'stories/components/date-picker/docs/examples/custom_header.tsx';
79-
const htmlContent = await e2eStandToHtml(standPath, 'en');
80-
81-
await page.setContent(htmlContent);
70+
await loadPage(page, 'stories/components/date-picker/docs/examples/custom_header.tsx', 'en');
8271

8372
// base check
8473
{
@@ -99,10 +88,7 @@ test.describe('DatePicker', () => {
9988
});
10089

10190
test('Date range comparator', async ({ page }) => {
102-
const standPath = 'stories/components/date-picker/docs/examples/date_range_comparator.tsx';
103-
const htmlContent = await e2eStandToHtml(standPath, 'en');
104-
105-
await page.setContent(htmlContent);
91+
await loadPage(page, 'stories/components/date-picker/docs/examples/date_range_comparator.tsx', 'en');
10692

10793
// base check
10894
{
@@ -123,11 +109,7 @@ test.describe('DatePicker', () => {
123109
});
124110

125111
test('Date range comparator advanced', async ({ page }) => {
126-
const standPath =
127-
'stories/components/date-picker/docs/examples/date_range_comparator_advanced_use.tsx';
128-
const htmlContent = await e2eStandToHtml(standPath, 'en');
129-
130-
await page.setContent(htmlContent);
112+
await loadPage(page, 'stories/components/date-picker/docs/examples/date_range_comparator_advanced_use.tsx', 'en');
131113

132114
// base check
133115
{
@@ -148,10 +130,7 @@ test.describe('DatePicker', () => {
148130
});
149131

150132
test('Disabled dates', async ({ page }) => {
151-
const standPath = 'stories/components/date-picker/docs/examples/disabled_dates.tsx';
152-
const htmlContent = await e2eStandToHtml(standPath, 'en');
153-
154-
await page.setContent(htmlContent);
133+
await loadPage(page, 'stories/components/date-picker/docs/examples/disabled_dates.tsx', 'en');
155134

156135
// base check
157136
{
@@ -172,11 +151,7 @@ test.describe('DatePicker', () => {
172151
});
173152

174153
test('Month range comparator', async ({ page }) => {
175-
const standPath =
176-
'stories/components/date-picker/docs/examples/month_range_comparator_advanced_use.tsx';
177-
const htmlContent = await e2eStandToHtml(standPath, 'en');
178-
179-
await page.setContent(htmlContent);
154+
await loadPage(page, 'stories/components/date-picker/docs/examples/month_range_comparator_advanced_use.tsx', 'en');
180155

181156
// base check
182157
{
@@ -197,10 +172,7 @@ test.describe('DatePicker', () => {
197172
});
198173

199174
test('Month range picker', async ({ page }) => {
200-
const standPath = 'stories/components/date-picker/docs/examples/monthrangepicker.tsx';
201-
const htmlContent = await e2eStandToHtml(standPath, 'en');
202-
203-
await page.setContent(htmlContent);
175+
await loadPage(page, 'stories/components/date-picker/docs/examples/monthrangepicker.tsx', 'en');
204176

205177
// base check
206178
{
@@ -221,10 +193,7 @@ test.describe('DatePicker', () => {
221193
});
222194

223195
test('Trigger and popper', async ({ page }) => {
224-
const standPath = 'stories/components/date-picker/docs/examples/trigger_and_popper.tsx';
225-
const htmlContent = await e2eStandToHtml(standPath, 'en');
226-
227-
await page.setContent(htmlContent);
196+
await loadPage(page, 'stories/components/date-picker/docs/examples/trigger_and_popper.tsx', 'en');
228197

229198
// base check
230199
{
@@ -245,10 +214,7 @@ test.describe('DatePicker', () => {
245214
});
246215

247216
test('Week picker', async ({ page }) => {
248-
const standPath = 'stories/components/date-picker/docs/examples/week_picker.tsx';
249-
const htmlContent = await e2eStandToHtml(standPath, 'en');
250-
251-
await page.setContent(htmlContent);
217+
await loadPage(page, 'stories/components/date-picker/docs/examples/week_picker.tsx', 'en');
252218

253219
// base check
254220
{

0 commit comments

Comments
 (0)