From 32c7ef25b13cb8ccc0d7ea12a9df8c2e2c3a5326 Mon Sep 17 00:00:00 2001 From: Jon Gunderson Date: Tue, 6 Jun 2023 10:48:30 -0500 Subject: [PATCH] Datepicker Modal Dialog: Fixed next/prev month bug and improve adherence with APG code style guide (pull #2643) This PR complements PR #2618 to provide the remaining changes to resolve issue #2581. This PR changes behavior of commands for next and previous month and year In the date picker dialog when the currently focused date does not exist in the previous or next month or year. With these changes, if the same day number does not exist in the newly displayed month, the last day of the newly displayed month receives focus. In addition to the above enhancement, this PR also includes the following changes: * Updates coding practices to use `class` constructor and pointer events * Updates documentation of page up and page down commands * Updates regression tests for page up and page down commands --------- Co-authored-by: Matt King --- .../examples/css/datepicker-dialog.css | 7 + .../examples/datepicker-dialog.html | 48 +- .../examples/js/datepicker-dialog.js | 1420 +++++++++-------- test/tests/dialog-modal_datepicker.js | 227 +-- 4 files changed, 894 insertions(+), 808 deletions(-) diff --git a/content/patterns/dialog-modal/examples/css/datepicker-dialog.css b/content/patterns/dialog-modal/examples/css/datepicker-dialog.css index c8b3a3f43b..0c02491917 100644 --- a/content/patterns/dialog-modal/examples/css/datepicker-dialog.css +++ b/content/patterns/dialog-modal/examples/css/datepicker-dialog.css @@ -91,6 +91,7 @@ color: white; text-transform: none; font-weight: bold; + border: none; } .datepicker-dialog button { @@ -177,11 +178,16 @@ padding-left: 1em; padding-right: 1em; padding-top: 1em; + border: none; + border-collapse: separate; } .datepicker-dialog table.dates th, .datepicker-dialog table.dates td { text-align: center; + background: white; + color: black; + border: none; } .datepicker-dialog table.dates tr { @@ -210,6 +216,7 @@ .datepicker-dialog table.dates td:hover { padding: 0; background-color: hsl(216deg 80% 92%); + color: black; } .datepicker-dialog table.dates td:focus { diff --git a/content/patterns/dialog-modal/examples/datepicker-dialog.html b/content/patterns/dialog-modal/examples/datepicker-dialog.html index a3a468836c..1dcfc74816 100644 --- a/content/patterns/dialog-modal/examples/datepicker-dialog.html +++ b/content/patterns/dialog-modal/examples/datepicker-dialog.html @@ -172,7 +172,7 @@

Accessibility Features