Datetime Range     

When you need to specify a date, time or datetime interval, use DatetimeRange component.
Before diving in, make sure you know how to configure a Datetime component as this one supports the exactly same properties.

Basic Usage

<!-- Date Range -->
<q-datetime-range
type="date"
v-model="range"
:min="min"
:max="max"
></q-datetime>
<!-- Time Range -->
<q-datetime-range
type="time"
v-model="range"
:min="min"
:max="max"
></q-datetime>
<!-- Datetime Range -->
<q-datetime-range
type="datetime"
v-model="range"
:min="min"
:max="max"
></q-datetime>

Vue Properties

Following properties are optional.

Vue PropertyDescription
typeOne of date, time or datetime strings.
minMinimum datetime at which selection can start.
maxMaximum datetime at which selection can stop.
formatFormat in MomentJs style of how input displays date and/or time.
ok-labelLabel for “OK” button on mobile Dialog.
cancel-labelLabel for “Cancel” button on mobile Dialog.
clear-labelLabel for “Clear” button on mobile Dialog.
label(Floating) label to use.
placeholderPlaceholder text to use.
static-labelOverrides label and placeholder and selected value. Display this label always regardless of selection status.
default-selectionSet default date/time (as Momentjs string) when Popover is shown and no value is yet selected.
readonlyWhen set to true the model cannot be altered.
disableWhen set to true the model cannot be altered.

The model needs to be an Object with {to, from} String properties, same as the model used for Datetime component.

Vue Events

Vue EventDescription
@inputTriggered when model (Object with to and from props) changes