Optional
id?: Attrs["id"]Optional
onBlur?: Attrs["onBlur"][Extend] Blur handler
Optional
onChange?: Attrs["onChange"][Extend] Change handler
Optional
onFocus?: Attrs["onFocus"][Extend] Focus handler
Computed
getter: () => string | nullGet the value from the model
Action
setter: (value: string) => voidSet the value to the model
Optional
type?: StringTypeType of form control.
When unspecified, it is deduced from the valueAs.
Optional
valueAs?: "string"Value type of the input element. It determines how getter/setter should handle the value.
Computed
getter: () => number | nullGet the value from the model
Action
setter: (value: number | null) => voidSet the value to the model
Optional
type?: NumericValueTypeType of form control.
When unspecified, it is deduced from the valueAs.
Value type of the input element. It determines how getter/setter should handle the value.
Computed
getter: () => string | nullGet the value from the model
String representation of the date. As Date instance has no distinction between date and datetime, it's developers' responsibility to format the date correctly.
type attr |
Expected format | Example |
---|---|---|
date | YYYY-MM-DD | 2024-12-31 |
datetime-local | YYYY-MM-DDTHH:mm | 2024-12-31T23:59 |
time | HH:mm or HH:mm:ss | 23:59 or 23:59:59 |
week | YYYY-Www | 2024-W52 |
month | YYYY-MM | 2024-12 |
Action
setter: (value: Date | null) => voidSet the value to the model
Optional
type?: DateValueTypeType of form control.
When unspecified, it is deduced from the valueAs.
Value type of the input element. It determines how getter/setter should handle the value.
[Override] ID of the input element