Appearance style for the field.
Wether outline
(default), legacy
, fill
or standard
.
In which format date will be displayed.
Defaults to YYYY-MM-DD
.
Whether the control is disabled.
Error text to be shown underneath the form field control.
Hint text to be shown underneath the form field control.
The floating label for a field.
If true, the datepicker will work in month picker mode.
Executed with an input value from user.
The placeholder text.
Wether to show today button or not.
Wether value of the field should be emitted when user is blurred out of the control.
Value of the input.
<drayman-datepicker />
Datepicker powered by Angular Material library. Accepts as an input and emits on change a date in
ISO 8601
format.Example of usage
import dayjs from 'dayjs'; export const component: DraymanComponent = async ({ forceUpdate }) => { let age; let date; const onValueChange = async ({ value }) => { date = value; const dateOfBirth = dayjs(value); age = dayjs().diff(dateOfBirth, 'years'); await forceUpdate(); } return () => { return ( <div> <drayman-datepicker value={date} label="Date of Birth" onValueChange={onValueChange} /> {age && `You are ${age} years old!`} </div> ) } }