Skip to content

Date picker

<ns-datepicker>

Overview

Use to help the user enter a date in a form.

✨ This is an auto-generated AI summary of the ns-datepicker's documentation. It may not be accurate. ✨

The ns-datepicker wraps the ns-inputter component. Guidelines defined for the ns-inputter should also be adhered to when using this component. See <ns-inputter> documentation.

Examples

Guidance

Implementation

Placement

The ns-datepicker component can be used in the following components:

Specification

Attributes

helper
Property
helper
Description
The helper text of the datepicker.
Type
string
label
Property
label
Description
The label of the datepicker and needs to be related to the purpose of the date.
Type
string
autocomplete
Property
autocomplete
Description
The autocomplete for the datepicker input.
Type
string
Options
off bday
Default
off
min
Property
min
Description
The minimum date available for selection.
Type
string
Default
undefined
max
Property
max
Description
The maximum date available for selection.
Type
string
Default
undefined
validation
Property
validation
Description
The list of validations to validate the selected date of the datepicker.
Type
Array
Default
[]
name
Property
name
Description
The name of the datepicker to reference in form data.
Type
string
value
Property
value
Description
The value of the selected date.
Type
string
Default
labelID
Property
labelID
Type
string
Default
heading
Property
heading
Type
string
Default
type
Property
type
Description
The type of the datepicker.
Type
string
Options
standard mask
Default
standard

Slots

SlotPermitted tagsDescription
tip-details<p> The tip details related to the `helper` text of the datepicker.

Events

NameDescription
changeDispatched when the value changes. It holds the value of the datepicker.

Figma

Please note: The ns-datepicker Figma component configuration instructions are available only to members of the British Gas workspace who have access to the Nucleus Figma UI Kit.

Last updated: