DateTimePicker
Reusable date time picker component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<DateTimePicker
id="datetime-picker"
name="datetime"
label="Date and time"
value="value"
min="min"
/>Legacy mount name: data-component="DateTimePicker".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
id | string | Optional | "datetime-picker" |
name | string | Optional | "datetime" |
label | string | Optional | "Date and time" |
value | string | Optional | "" |
min | string | Optional | "" |
max | string | Optional | "" |
required | boolean | Optional | false |
disabled | boolean | Optional | false |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/DateTimePicker.wrn
component DateTimePicker {
props {
id = "datetime-picker"
name = "datetime"
label = "Date and time"
value = ""
min = ""
max = ""
required = false
disabled = false
class = ""
}
view {
<div class="wire-field {class}">
<label for="{id}" class="wire-label">{label}</label>
<input id="{id}" name="{name}" type="datetime-local" value="{value}" min="{min}" max="{max}" required="{required}" disabled="{disabled}" class="wire-input" />
</div>
}
}