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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eb16377
feat(date-picker): add date picker
gregtyler Jan 8, 2024
83cc9e1
refactor(date picker): updates to submitted datepicker component code
chrispymm Jun 26, 2024
611c50b
refactor(date picker): update styles to match design system design
chrispymm Jun 27, 2024
606dd43
refactor(date picker): add calendar button via JS for pregressive enh…
chrispymm Jun 28, 2024
0998c49
refactor(date picker): remove unnecessary data-button attributes
chrispymm Jun 28, 2024
2f8830e
docs(date picker component): adding guidance for date picker component
robertjmccarthy Jul 1, 2024
6f9178e
docs(date picker component): updating hint text on component example
robertjmccarthy Jul 1, 2024
5456d6a
feat(date picker): add support for disabling dates and days
chrispymm Jul 1, 2024
c6b513c
docs(date picker component): change to input field and example height
robertjmccarthy Jul 1, 2024
59d4171
Merge branch 'add-date-picker' of https://github.com/ministryofjustic…
robertjmccarthy Jul 4, 2024
28bdb2f
docs(documentation change): updating guidance for date picker component
robertjmccarthy Jul 4, 2024
f4cff19
docs(update to component documentation): adding examples to date pick…
robertjmccarthy Jul 4, 2024
f486c8b
feat(date picker): updates to styling, and WIP changes to how disable…
chrispymm Jul 3, 2024
7fdecfb
feat(date picker): update disabled and hover styles to match figma de…
chrispymm Jul 8, 2024
5b52fee
feat(date picker): add leadingzeros config parameter
chrispymm Jul 8, 2024
c942b2e
feat(date picker): add config option for week start day
chrispymm Jul 8, 2024
347aced
feat(date picker): allow passing date ranges to disabledDates
chrispymm Jul 8, 2024
aa4e78c
feat(date picker): add examples to date picker guidance page
chrispymm Jul 8, 2024
10d57c5
ci(dockerfile): remove asset copy directive from the dockerfile
chrispymm Jul 10, 2024
01b498e
feat(date picker): add horizontal and vertical pairs example
chrispymm Jul 10, 2024
3fa2db0
refactor(date picker): refactor date picker template to be cleaner
chrispymm Jul 11, 2024
4ad1745
docs(date picker): remove from-to stacked examples
chrispymm Jul 11, 2024
bdebcc0
refactor(date picker): refactor date picker JS
chrispymm Jul 11, 2024
3ea4f7d
fix(date picker): fix min-max date params in template
chrispymm Jul 11, 2024
caab9d6
docs(date picker component): updating component guidance after conten…
robertjmccarthy Jul 17, 2024
2f2def6
docs(date picker component): changing example image on date picker gu…
robertjmccarthy Jul 17, 2024
35bb948
docs(date picker component): updating example image for filtering wit…
robertjmccarthy Jul 17, 2024
087b03a
docs(date picker component): update
helennickols Jul 22, 2024
b8ad0e4
docs(date picker component): update content
helennickols Jul 22, 2024
73f7071
feat(date picker): code formatting and updates following accessibilit…
chrispymm Jul 24, 2024
59dad3a
docs(date picker component): update content
helennickols Jul 24, 2024
0e3e21f
Merge branch 'add-date-picker' of https://github.com/ministryofjustic…
helennickols Jul 24, 2024
4516b63
feat(date picker): allow component to be configured via JS as well as…
chrispymm Jul 25, 2024
638975e
feat(date picker): update hover cover remove second excluded dates ex…
chrispymm Jul 25, 2024
fde3653
docs(date picker component): update content
helennickols Jul 25, 2024
656e1c9
feat(date picker): update diasbled dates with strikethrough and hover…
chrispymm Jul 25, 2024
d4ba814
feat(date picker): fix example open in new window link styling
chrispymm Jul 26, 2024
a004155
refactor(date picker): small final tidying tweaks to datepicker
chrispymm Jul 26, 2024
354afc7
fix(examples): adds example title to example tabs links to prevent ma…
chrispymm Jul 26, 2024
8d16275
docs(date picker): add figma link to first example
chrispymm Jul 26, 2024
30a7644
Revert "refactor(date picker): small final tidying tweaks to datepicker"
chrispymm Jul 26, 2024
faad0f3
refactor(date picker): small formatting nits
chrispymm Jul 26, 2024
f0e687f
docs(date picker): update date-picker component README within package
chrispymm Jul 26, 2024
5dbf16d
feat(date picker): fixes following code review
chrispymm Jul 29, 2024
807e11a
docs(date picker): change url in date picker readme
chrispymm Jul 29, 2024
527ea89
docs(date picker component): update content
helennickols Jul 29, 2024
02b2e23
Merge branch 'add-date-picker' of https://github.com/ministryofjustic…
helennickols Jul 29, 2024
d0ae231
docs(date picker component): update content
helennickols Jul 30, 2024
68d18f4
docs(date picker component): update content
helennickols Jul 30, 2024
6f03b16
docs(date picker component): update content
helennickols Jul 30, 2024
f4557f3
refactor(date picker): update sass to follow GOV.UK BEM conventions
chrispymm Jul 31, 2024
8a214d0
docs(date picker): add date picker to what's new section on homepage
chrispymm Jul 31, 2024
088cc37
refactor(date picker): remove need for duplicate date regex
chrispymm Jul 31, 2024
b5308fd
fix(date picker): move escape key event listener to dialog element
chrispymm Jul 31, 2024
f63509b
refactor(date picker): refactor event.keycode to event.key
chrispymm Jul 31, 2024
5346361
fix(date picker): fixes and changes based on code review
chrispymm Jul 31, 2024
be4ff59
docs(date picker component): update content
helennickols Jul 31, 2024
db2cb06
Merge branch 'add-date-picker' of https://github.com/ministryofjustic…
helennickols Jul 31, 2024
7c746f5
refactor(date picker): remove unused css class on the dialog
chrispymm Jul 31, 2024
9c15a4f
docs(date picker): add figma link to all examples
chrispymm Jul 31, 2024
4d96d23
fix(date picker): fix mindate and maxdate functionality
chrispymm Jul 31, 2024
ce51f88
docs(date picker): update excluded dates example to also include min …
chrispymm Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ module.exports = function (eleventyConfig) {
});
});

eleventyConfig.addShortcode("dateInCurrentMonth", (day) => `${day}/${new Date().getMonth()+1}/${new Date().getFullYear()}`);

eleventyConfig.addShortcode("lastUpdated", function (component) {
if (process.env.STAGING) return '';

Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm ci

COPY assets assets
COPY docs docs
COPY src src
COPY package package
Expand Down
16 changes: 16 additions & 0 deletions docs/_includes/arguments/date-picker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
| Name | Type | Required | Description |
| ------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| id | string | Yes | The ID of the input. |
| name | string | Yes | The name of the input, which is submitted with the form data. |
| value | string | No | Optional initial value of the input. |
| formGroup | object | No | Additional options for the form group containing the text input component. See [formGroup](#options-date-picker-form-group). |
| label | object | Yes | The label used by the text input component. See [GOV.UK text input documentation](https://design-system.service.gov.uk/components/text-input/) for label options. |
| hint | object | No | Can be used to add a hint to a text input component. See [GOV.UK text input documentation](https://design-system.service.gov.uk/components/text-input/) for hint options. |
| errorMessage | object | No | Can be used to add an error message to the text input component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`. See [GOV.UK text input documentation](https://design-system.service.gov.uk/components/text-input/) for errorMessage options. |
| minDate | string | No | Earliest date that can be selected (format dd/mm/yyyy) |
| maxDate | string | No | Latest date that can be selected (format dd/mm/yyyy) |
chrispymm marked this conversation as resolved.
Show resolved Hide resolved
| exludedDates | string | No | String of space separated dates that cannot be selected |
| excludedDays | string | No | String of space separated days of the week that cannot be selected |
| weekStartDay | string | No | Day of the week the calendar starts on. Either 'monday' or 'sunday'. Defaults to 'monday' |


20 changes: 16 additions & 4 deletions docs/_includes/example.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@
</div>
<div class="app-tabs" data-module="app-tabs">
<ul class="app-tabs__list" role="tablist">
<li class="app-tabs__list-item" role="presentation"><a class="app-tabs__tab" href="#html-default-{{ id }}" role="tab" id="tab_html-default-{{ id }}" aria-controls="html-default-{{ id }}">HTML</a></li>
<li class="app-tabs__list-item" role="presentation"><a class="app-tabs__tab" href="#nunjucks-default-{{ id }}" role="tab" id="tab_nunjucks-default-{{ id }}" aria-controls="nunjucks-default-{{ id }}">Nunjucks</a></li>
{%- if jsCode %}<li class="app-tabs__list-item" role="presentation"><a class="app-tabs__tab" href="#js-default-{{ id }}" role="tab" id="tab_js-default-{{ id }}" aria-controls="js-default-{{ id }}">JavaScript</a></li>{% endif -%}
{%- if figmaLink %}<li class="app-tabs__list-item" role="presentation"><a class="app-tabs__tab" href="#figma-default-{{ id }}" role="tab" id="tab_figma-default-{{ id }}" aria-controls="figma-default-{{ id }}">Figma</a></li>{% endif -%}
<li class="app-tabs__list-item" role="presentation">
<a class="app-tabs__tab" href="#html-default-{{ id }}" role="tab" id="tab_html-default-{{ id }}" aria-controls="html-default-{{ id }}">HTML <span class="govuk-visually-hidden">({{ title }})</span></a>
</li>
<li class="app-tabs__list-item" role="presentation">
<a class="app-tabs__tab" href="#nunjucks-default-{{ id }}" role="tab" id="tab_nunjucks-default-{{ id }}" aria-controls="nunjucks-default-{{ id }}">Nunjucks <span class="govuk-visually-hidden">({{ title }})</span></a>
</li>
{%- if jsCode %}
<li class="app-tabs__list-item" role="presentation">
<a class="app-tabs__tab" href="#js-default-{{ id }}" role="tab" id="tab_js-default-{{ id }}" aria-controls="js-default-{{ id }}">JavaScript <span class="govuk-visually-hidden">({{ title }})</span></a>
</li>
{% endif -%}
{%- if figmaLink %}
<li class="app-tabs__list-item" role="presentation">
<a class="app-tabs__tab" href="#figma-default-{{ id }}" role="tab" id="tab_figma-default-{{ id }}" aria-controls="figma-default-{{ id }}">Figma</a>
</li>
{% endif -%}
</ul>

<div class="app-tabs__panel app-tabs__panel--hidden" id="html-default-{{ id }}" data-module="app-copy" role="tabpanel" aria-labelledby="tab_html-default-{{ id }}">
Expand Down
17 changes: 15 additions & 2 deletions docs/_includes/layouts/home.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
</div>
</div>

<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h2 class="govuk-heading-l">What’s new</h2>
<p class="govuk-body">29 July 2024: We’ve released a new <a href="/components/date-picker">date picker component</a> to help users select a date quickly and easily.</p>
<p class="govuk-body"><a href="https://docs.google.com/forms/d/1i7rinQINSjdQ6w_SChXqxQFTttPMgfcSfPamq8YRnP8/edit" class="govuk-link">Sign up to get emails</a> about the MoJ Design System.</p>
<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">
</div>
</div>
</div>

<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half">
Expand All @@ -32,7 +43,7 @@
<h2 class="govuk-heading-l govuk-!-margin-bottom-3">Components</h2>
<p class="govuk-body">Save time with reusable, accessible components for forms, navigation, panels, tables and more.</p>
<p class="govuk-body">
<a href="/components" class="govuk-link"><strong>Find a component</strong></a>
<a href="/components" class="govuk-link">Find a component</a>
</p>
</section>
</article>
Expand All @@ -44,13 +55,15 @@
<h2 class="govuk-heading-l govuk-!-margin-bottom-3">Patterns</h2>
<p class="govuk-body">Help users complete common tasks like uploading files, filtering lists, and getting help.</p>
<p class="govuk-body">
<a href="/patterns" class="govuk-link"><strong>Find a pattern</strong></a>
<a href="/patterns" class="govuk-link">Find a pattern</a>
</p>
</section>
</article>
</div>
</div>

<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">

{{ content | safe }}
</div>

Expand Down
24 changes: 12 additions & 12 deletions docs/_includes/layouts/partials/suggest-a-change-and-help.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@

<div class="govuk-!-padding-bottom-3"></div>

<div class="govuk-notification-banner" role="region" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner" role="region" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__content">
<p class="govuk-notification-banner__heading">
Suggest a change
</p>
<p class="govuk-notification-banner__body">
To help improve the MoJ Design System, you can suggest changes.
</p>
<h2 id="govuk-notification-banner-title" class="govuk-notification-banner__heading">
Suggest a change
</h2>
<p class="govuk-notification-banner__body">
Tell us about the change you're proposing by using the <a href="https://forms.gle/FpDpbgttwmfmcz8o7" class="govuk-link">suggest a change form</a>. The MoJ Design System Group will be notified of your suggestion and will review it.
You can <a href="https://forms.gle/FpDpbgttwmfmcz8o7" class="govuk-link">suggest a change to improve the MoJ Design System</a>.
</p>
<p>
The MoJ Design System team will review it.
</p>

<hr class="govuk-section-break govuk-section-break--l govuk-section-break--visible">

<p class="govuk-notification-banner__heading">
Need help?
</p>
<h2 class="govuk-notification-banner__heading">
Get help
</h2>
<p class="govuk-notification-banner__body">
The MoJ Design System Group provides support for users of the MoJ Design System. <a href="/community/help-and-feedback" class="govuk-link">Contact us</a> to ask for help.
<a href="/community/help-and-feedback" class="govuk-link">Contact the MoJ Design System team</a> for support.
</p>

</div>
Expand Down
15 changes: 15 additions & 0 deletions docs/assets/images/date-picker-filter-example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/assets/images/date-picker-question-example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/assets/stylesheets/components/_example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

.app-example__new-window {
@include govuk-font($size: 14);
@include govuk-font($size: 16);
border: 1px solid $govuk-border-colour;
position: absolute; top: -1px; left: -1px;

Expand All @@ -34,18 +34,18 @@
background-color: white;
color: govuk-colour("blue");
display: block;
padding: 5px 10px;
margin: 8px;
text-decoration: none;
}

a:hover {
color: govuk-colour("light-blue");
color: $govuk-link-hover-colour;
}

a:focus {
// color: $govuk-focus-text-colour;
color: $govuk-focus-text-colour;
background-color: $govuk-focus-colour;
// box-shadow: 0 -2px $govuk-focus-colour, 0 4px $govuk-focus-text-colour;
box-shadow: 0 -2px $govuk-focus-colour, 0 4px $govuk-focus-text-colour;
// border-color: $govuk-focus-text-colour;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/community/suggest-a-change.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Suggest a Change
layout: layouts/community.njk
title: Suggest a change
---

To help improve the MoJ Design System, you can suggest changes to components and patterns.
Expand Down
116 changes: 90 additions & 26 deletions docs/components/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,115 @@ layout: layouts/component.njk
title: Date picker
---

<span class="govuk-caption-xl">This component has recently been contributed to the MoJ Design System and is being developed.</span>
<span class="govuk-caption-xl">The date picker component enables users to select a date from a calendar. </span>

## Status of development
{% example "/examples/date-picker", 590 %}

The below criteria all need to be met for a component to be considered as fully developed for use within the MoJ Design System.

This page will be updated as the component is developed.
## Overview

When users first open the date picker's calendar it'll show today's date. Users do not have to use this calendar view to select a date - they can also enter one directly into the text field.

### When to use

Users might want to use the calendar view:

- for a relative date or one they need to look up, for example last Thursday or next Wednesday
- to enter today's date more quickly
- for available dates only, such as for prison visits

### When not to use

Do not use the date picker:

- for a memorable date, such as a user's date of birth
- for a date that users know or can easily look up, like an appointment date on a letter
- when only a rough date is needed, for example just a month and year

Use the [GOV.UK Design System's date input component](https://design-system.service.gov.uk/components/date-input/) instead.

### Things to consider

Date pickers are fully navigable using a keyboard, but can be slow for keyboard-only and screen reader users.

### Similar or linked components

There's also the ['Ask users for dates' pattern in the GOV.UK Design System](https://design-system.service.gov.uk/patterns/dates/).


## How to use

### Hint text

The date picker hint text is set to 17/5/2024. This can be changed to a more helpful date, for example the start of a scheme. Add a full stop at the end.

### Excluding dates
chrispymm marked this conversation as resolved.
Show resolved Hide resolved

You can exclude (or disable) specific dates and days of the week from the date picker, for example bank holidays or every weekend.

{% example "/examples/date-picker-excluded-dates", 590 %}

You need to add server-side validation for when users enter an unavailable date directly into the text field (rather than in the calendar). This will show them an error message.

Excluded dates have the correct colour contrast ratio with the date text and calendar background. This is WCAG 2.2 compliant. However, these dates may be harder to view for users with low vision or colour blindness, so there’s also a strikethrough. Numbers with a strikethrough can be harder for people with dyscalculia to read.

If there are not many available dates, users will have to navigate a lot to find one. Consider listing these dates with radio buttons instead.

### Error messages

Follow the [GOV.UK Design System guidance on error messages](https://design-system.service.gov.uk/components/error-message/).

{% example "/examples/date-picker-error", 590 %}

<table class="govuk-table">
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th scope="col" class="govuk-table__header">Development criteria</th>
<th scope="col" class="govuk-table__header">Status</th>
<th scope="col" class="govuk-table__header">Error state</th>
<th scope="col" class="govuk-table__header">Error message</th>
</tr>
</thead>
<tbody class="govuk-table__body">
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">WCAG 2.2 compliant</th>
<td class="govuk-table__cell"><strong class="govuk-tag govuk-tag--grey">
Being reviewed
</strong></td>
<th scope="row" class="govuk-table__header">No date is entered or selected from the calendar</th>
<td class="govuk-table__cell">Enter or select a date</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">HTML / Nunjucks version</th>
<td class="govuk-table__cell"><strong class="govuk-tag govuk-tag--orange">
In progress
</strong></td>
<th scope="row" class="govuk-table__header">The date is in the wrong format</th>
<td class="govuk-table__cell">Enter the date in the correct format, for example, 17/5/2024</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Figma version</th>
<td class="govuk-table__cell"><strong class="govuk-tag govuk-tag--orange">
In progress
</strong></td>
<th scope="row" class="govuk-table__header">The date does not exist</th>
<td class="govuk-table__cell">Enter a real date</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Documentation</th>
<td class="govuk-table__cell"><strong class="govuk-tag govuk-tag--grey">
Being reviewed
</strong></td>
<th scope="row" class="govuk-table__header">The date is incomplete</th>
<td class="govuk-table__cell">Enter a full date, for example 17/5/2024</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Researched and tested</th>
<td class="govuk-table__cell"><strong class="govuk-tag govuk-tag--red">
Not started
</strong></td>
<th scope="row" class="govuk-table__header">The date is excluded</th>
<td class="govuk-table__cell">Select an available date from the calendar</td>
</tr>
</tbody>
</table>

### Using multiple date pickers

If you're using more than one date picker, give each text field its own error summary and message (even if the error is the same).


## Examples

### Filtering information with a date picker

<p><img src="/assets/images/date-picker-filter-example.svg" alt="A screenshot with the title 'Attended appointments'. In a grey box is the title Filter, underneath is the title Date and then a text input field. The calendar icon and a green 'Apply filter' button is on the right. Below this element is the text '7 appointments'. Details of these appointments are shown."></p>

### Asking a question with a date picker

<p><img src="/assets/images/date-picker-question-example.svg" alt="A screenshot with the title 'What date do you want to view appointments for?' Underneath is the title 'Date' and then a text input field with the calendar icon. Underneath that is a green 'Continue' button."></p>


## Contributors

Thanks to Dom Billington, Eddie Shannon, David Middleton, and the DPS Connect team for contributing this component.

This component was based on the [Scottish Government Design System date picker](https://designsystem.gov.scot/components/date-picker).
22 changes: 22 additions & 0 deletions docs/examples/date-picker-error/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: layouts/example.njk
title: Date Picker (example)
arguments: date-picker
figma_link: https://www.figma.com/design/N2xqOFkyehXwcD9DxU1gEq/MoJ-Figma-Kit?node-id=792-861&t=6DfPOX7RAnjrVE0j-0
---

{%- from "moj/components/date-picker/macro.njk" import mojDatePicker -%}

{{ mojDatePicker({
id: "date",
name: "date",
label: {
text: "Date"
},
hint: {
text: "For example, 17/5/2024."
},
errorMessage: {
text: 'Enter or select a date'
}
}) }}
23 changes: 23 additions & 0 deletions docs/examples/date-picker-excluded-dates/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: layouts/example.njk
title: Date Picker Excluded Dates (example)
figma_link: https://www.figma.com/design/N2xqOFkyehXwcD9DxU1gEq/MoJ-Figma-Kit?node-id=792-861&t=6DfPOX7RAnjrVE0j-0
---

{%- from "moj/components/date-picker/macro.njk" import mojDatePicker -%}

{{ mojDatePicker({
id: "date",
name: "date",
label: {
text: "Date"
},
hint: {
text: "For example, 17/5/2024."
},
value: "10/04/2025",
minDate: "01/04/2025",
maxDate: "30/04/2025",
excludedDates: "02/04/2025 18/04/2025 21/04/2025",
excludedDays: "saturday sunday"
}) }}
19 changes: 19 additions & 0 deletions docs/examples/date-picker-excluded-days/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: layouts/example.njk
title: Date Picker Excluded Days (example)
figma_link: https://www.figma.com/design/N2xqOFkyehXwcD9DxU1gEq/MoJ-Figma-Kit?node-id=792-861&t=6DfPOX7RAnjrVE0j-0
---

{%- from "moj/components/date-picker/macro.njk" import mojDatePicker -%}

{{ mojDatePicker({
id: "date",
name: "date",
label: {
text: "Date"
},
hint: {
text: "For example, 17/5/2024."
},
disabledDays: "saturday sunday"
}) }}
Loading