DateInput()function

DateInput({
	name,
	title = "",
	placeholder = title, // Placeholder must be defined or `:placeholder-shown` CSS rules won't show.
	required = false,
	disabled = false,
	message = "",
	value,
	onValue,
	min,
	max,
	input = "date",
	step,
	...variants
}: DateInputProps): ReactElement
ParamType
variantsDateInputProps
Props for DateInput, a date/time <input> that emits an ISO string value. required
    .minPossibleDate
Values that can be converted to dates.
    .maxPossibleDate
Values that can be converted to dates.
    .inputDateInputType
type="" prop for HTML <input /> tags that are relevant for dates.
    .stepnumber
Return
ReactElement
A native date/time <input> element.

Date, time, or datetime input that accepts a PossibleDate and emits an ISO string value.

  • The input prop selects the underlying <input type="date|time|datetime-local"> and matching string format.

Examples

<DateInput name="dob" input="date" value={dob} onValue={setDob} />