Inline Datetime
The Inline Datetime component provides a method to input dates and time or both and is shown directly on the page or element you are dislpaying. There are also two more versions available: Datetime, which also uses a modal/popup, as well as a Datetime Range.
You’ll notice in the demos that the iOS and Material Datetime pickers look and act totally different, just like their native counterparts.
Works well with QField for additional functionality such as a helper, error message placeholder and many others.
Basic Usage
<q-inline-datetime v-model="model" type="date" /> |
Vue Properties
Supports v-model
which must be a String, Number or Date Object. Please refer to the Datetime component for detailed information regarding the model that must be used.
Vue Property | Type | Description |
---|---|---|
type | String | One of date , time or datetime . Default is date . |
min | String | Optional minimum value it can take. Has same format as Datetime model. |
max | String | Optional maximum value it can take. Has same format as Datetime model. |
color | String | One from Color Palette. |
month-names | Array | Array of month names, starting with January. |
day-names | Array | Array of day names, starting with Sunday, Monday, … |
default-selection | String/Number/Date | Default date/time for picker when model is not yet set. |
monday-first | Boolean | Use Monday as first day of week. Otherwise it’s Sunday. |
saturday-first | Boolean | Use Saturday as first day of week. Otherwise it’s Sunday. |
format24h | Boolean | Use 24 hour time for Material picker instead of AM/PM system which is default. |
disable | Boolean | If set to true , the field is inaccessable. |
readonly | Boolean | If set to true , the component is readonly. |
Vue Methods
Vue Method | Description |
---|---|
clear() | Sets model to empty string (removes current value). |
toggleAmPm() | Toggle between AM - PM. |
Vue Events
Vue Event | Description |
---|---|
@change(newValue) | Triggered on model value change. |