DatePicker
Component that lets the user select a date.
Import
JSX
Usage
JSX
Return value
(name: string, value: string) where the name is the given name
of the Datepicker input and the datestring is in the format yyyy-mm-dd.
Variants
You can also add additional props to extend the functionalities of the datepicker.
Year limits
JSX
Description
Select a date for an appointment
JSX
Disabled days
JSX
Disabled input
JSX
Props
| Prop | Type | Default | Description |
|---|---|---|---|
id* | string | datepicker | id of date input |
name* | string | datepicker | name of date input |
date* | string | "" | selected date |
onChange* | (name: string, value: string) => void | - | callback function that handles input change |
required | boolean | true | is the date input required or not |
disabled | boolean | false | disables/enables date input |
description | string | "" | displays a description about the date input |
minYear | number | - | minimum years value |
maxYear | number | - | maximum years value |
disabledDays | Date[] | - | days that cannot be selected |
