Skip to content
W WRNexusJS
forms component

DateTimePicker

Reusable date time picker component.

@wrnexus/ui 0.2.679 props0 slots0 events

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

PropTypeRequirementDefault
idstringOptional"datetime-picker"
namestringOptional"datetime"
labelstringOptional"Date and time"
valuestringOptional""
minstringOptional""
maxstringOptional""
requiredbooleanOptionalfalse
disabledbooleanOptionalfalse
classstringOptional""

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>
    }
}