Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(date picker): add date picker component #601

Merged
merged 62 commits into from
Jul 31, 2024
Merged

Conversation

chrispymm
Copy link
Contributor

@chrispymm chrispymm commented Jun 28, 2024

This PR adds the date picker component submitted by the DPS connect team.

Some changes have been made both to the component and the code since contribution:

Disabled Dates

  • These are now aria-disabled instead of disabled to allow them to be navigable and discoverable for keyboard & screenreader users. (the Scottish design system has made this improvement to their picker too)
  • The visual styling has been changed for improved accessibility, including adding a strikethrough
  • It was recommended to avoid using 'disabled' so the external api and documentation refer to these as 'excluded' dates

New functionality

  • Added functionality to exclude certain days of the week from selection
  • excludedDates supports date ranges (this is enabled in code, but not a feature of the documentation yet)
  • Ability to configure the week start day to either Sunday or Monday

Other

  • Stylesheet has been altered to be less nested (as recommended by GDS/GOV.UK guidelines)
  • JS updated to follow convention of using a $ prefix for element variables.
  • General JS refactoring and tidying
  • Addition of JS configuration - as contributed it wasn't possible to fully configure the component via JS. This is now possible, following the GDS convention where JS config overrides defaults and data attributes override JS config. The code to do this was borrowed from the GOV.UK design system. (Ideally this would be extracted into a separate utility. Or even better GOV.UK could expose it)
  • Addition of JSDoc blocks and definitions.

@chrispymm chrispymm requested a review from a team as a code owner June 28, 2024 10:50
@chrispymm chrispymm added the staging:request Add this label to request a staging environment for a pull request label Jun 28, 2024
Copy link

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jun 28, 2024
@robertjmccarthy robertjmccarthy added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 1, 2024
@robertjmccarthy robertjmccarthy added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 1, 2024
@robertjmccarthy robertjmccarthy added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 1, 2024
@robertjmccarthy robertjmccarthy added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 4, 2024
Copy link

github-actions bot commented Jul 4, 2024

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 4, 2024
@robertjmccarthy robertjmccarthy added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 4, 2024
Copy link

github-actions bot commented Jul 4, 2024

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot removed the staging:request Add this label to request a staging environment for a pull request label Jul 4, 2024
@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 31, 2024
@chrispymm chrispymm requested a review from gregtyler July 31, 2024 12:33
@chrispymm chrispymm added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 31, 2024
Copy link

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 31, 2024
@helennickols helennickols added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 31, 2024
Copy link

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 31, 2024
@chrispymm chrispymm added staging:request Add this label to request a staging environment for a pull request and removed staging:active Automatic label added when the PR is on the staging environment labels Jul 31, 2024
Copy link

🚀 Deploying to staging environment

Username: staging, Password: moj

@github-actions github-actions bot added staging:active Automatic label added when the PR is on the staging environment and removed staging:request Add this label to request a staging environment for a pull request labels Jul 31, 2024
@chrispymm chrispymm merged commit 0f52877 into main Jul 31, 2024
10 checks passed
@chrispymm chrispymm deleted the add-date-picker branch July 31, 2024 14:48
gregtyler pushed a commit that referenced this pull request Jul 31, 2024
# [2.2.0](v2.1.3...v2.2.0) (2024-07-31)

### Features

* **date picker:** add date picker component ([#601](#601)) ([0f52877](0f52877))
@gregtyler
Copy link
Contributor

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released staging:active Automatic label added when the PR is on the staging environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants