Configuration object
Name of the component
Label text
Type of the date field (date, datetime-local, month, time, week, multiple, range)
Placeholder text
Default value for the date field
If true, the field is required
If true, the field is disabled
If false/undefined the field is valid. If a string is provided, it will be used as the validation message
Basic usage with required props
dateField({
name: 'birthDate',
label: 'Birth Date',
type: 'date'
});
Usage with default value
dateField({
name: 'appointmentDate',
label: 'Appointment Date',
type: 'datetime-local',
defaultValue: '2024-01-15T10:00',
placeholder: 'Select appointment date and time',
required: true,
disabled: false
});
Date field component for date input.