TimePicker
Reusable time picker component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<TimePicker
id="time-picker"
name="time"
label="Time"
value="value"
min="min"
/>Legacy mount name: data-component="TimePicker".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
id | string | Optional | "time-picker" |
name | string | Optional | "time" |
label | string | Optional | "Time" |
value | string | Optional | "" |
min | string | Optional | "" |
max | string | Optional | "" |
step | number | Optional | 60 |
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/TimePicker.wrn
component TimePicker {
props {
id = "time-picker"
name = "time"
label = "Time"
value = ""
min = ""
max = ""
step = 60
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="time" value="{value}" min="{min}" max="{max}" step="{step}" required="{required}" disabled="{disabled}" class="wire-input" />
</div>
}
}