Optional
autoClose when date is selected
Optional
autocompleteThe autocomplete property sets or returns the value of the autocomplete attribute in a text field. When autocomplete is on, the browser automatically complete values based on values that the user has entered before.
Optional
autofocusWhen true, add the autofocus attribute to the input field.
Optional
canShow a clear button (small 'x') to clear the input value. Only valid for TextInput.
Optional
classThe class name(s) for this virtual element, as a space-separated list.
Optional
classThe class name(s) for this virtual element, as a space-separated list.
Optional
colsNumber of cols of a textarea
Optional
dataWill replace the helperText, if any, when the input is invalid.
Optional
dataWill replace the helperText, if any, when the input is valid.
Optional
dateLegacy: Date label (use label instead)
Optional
dateEnable date range selection mode for selecting start and end dates
Optional
defaultThe initial date to view when first opened
Optional
defaultInitial value for uncontrolled mode. Only used when value
and oninput
are not provided.
In uncontrolled mode, the component manages its own internal state.
Optional
disabledSets the input field to disabled.
Optional
disableCustom function to disable specific days
Optional
disableDisable weekends
Optional
displayLegacy: Display format (use format instead)
Optional
firstFirst day of week (0: Sunday, 1: Monday etc)
Optional
formatDate format attribute (alternative to format property)
Optional
heightFor vertical range inputs: height of the slider
Optional
helperAdd a description underneath the input field.
Optional
i18nInternationalization
Optional
iconUses Materialize icons as a prefix or postfix.
Optional
idOptional ID.
Optional
initialInitial end date for range selection
Optional
initialInitial start date for range selection
Optional
isIf true, add a mandatory * after the label (if any), and add the required and aria-required attributes to the input element.
Optional
keyUnique key for use of the element in an array.
Optional
labelOptional label.
Optional
maxWhen input type is a number, optionally specify the maximum value.
Optional
maxThe latest date that can be selected
Optional
maxMaximum number of days between start and end dates
Optional
maxWhen input type is a text or text area, optionally specify the maximum length.
Optional
maxFor range inputs with minmax: initial maximum value
Optional
minWhen input type is a number, optionally specify the minimum value.
Optional
minThe earliest date that can be selected
Optional
minMinimum number of days between start and end dates
Optional
minWhen input type is a text or text area, optionally specify the minimum length.
Optional
minmaxFor range inputs: enable dual thumb (min/max) range selection
Optional
minFor range inputs with minmax: initial minimum value
Optional
newIf true, break to a new row
Optional
onblurInvoked when the element looses focus
Optional
onchangeInvoked when the input looses focus. For range sliders with minmax, second parameter is maxValue.
Optional
onCallback when picker is closed
Optional
oninputInvoked when the value changes (immediate feedback). For range sliders with minmax, second parameter is maxValue.
Optional
onkeydownKey down event
Optional
onkeypressKey press event
Optional
onkeyupKey up event
Optional
onCallback when picker is opened
Optional
onCallback when date is selected (single date or range start/end)
Optional
parseCustom parse function
Optional
patternThe pattern property sets or returns the value of the pattern attribute of a text field. The pattern attribute specifies a regular expression that the text field's value is checked against.
Optional
placeholderAdd a a placeholder to the input field.
Optional
readThe readOnly property sets or returns whether a text field is read-only, or not. A read-only field cannot be modified. However, a user can tab to it, highlight it, and copy the text from it.
Optional
requiredAdd the required and aria-required attributes to the input element
Optional
rowsNumber of rows of a textarea
Optional
setMake the defaultDate the initial selected value
Optional
showShow clear button
Optional
showShow week numbers
Optional
styleOptional style information.
Optional
tooltipFor range inputs with valueDisplay: position of value tooltips
Optional
validateWhen returning true or an empty string, clear the custom validity (= valid). When returning false, set the custom validity message to a default string string. When returning a non-empty string, set the custom validity message to this string.
Optional
valueCurrent value of the input field. If provided along with oninput
, the component operates in controlled mode
where the parent manages the state. The parent must update this value in response to oninput
callbacks.
Optional
valueFor range inputs: control value display behavior. 'auto' shows on drag, 'always' shows always, 'none' never shows
Optional
verticalFor range inputs: render vertically instead of horizontally
Optional
weekWeek numbering system: 'iso' (ISO 8601) or 'local' (local convention)
Optional
yearrangeYear range attribute (alternative to yearRange property)
Optional
yearNumber of years either side, or array of upper/lower range
Optional
onbeforeremoveThe onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes.
Optional
onbeforeupdateThe onbeforeupdate hook is called before a vnode is diffed in a update.
Optional
oncreateThe oncreate hook is called after a DOM element is created and attached to the document.
Optional
oninitThe oninit hook is called before a vnode is touched by the virtual DOM engine.
Optional
onremoveThe onremove hook is called before a DOM element is removed from the document.
Optional
onupdateThe onupdate hook is called after a DOM element is updated, while attached to the document.
Any other virtual element properties, including attributes and event handlers.