quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
184 lines (168 loc) • 4.78 kB
JSON
{
"mixins": [ "mixins/datetime" ],
"meta": {
"docsUrl": "https://v1.quasar.dev/vue-components/time"
},
"behavior": {
"$listeners": true
},
"props": {
"value": {
"extends": "value",
"required": true,
"desc": "Time of the component; Either use this property (along with a listener for 'input' event) OR use v-model directive",
"examples": [
"v-model=\"currentTime\""
],
"category": "model"
},
"format24h": {
"type": "Boolean",
"desc": "Forces 24 hour time display instead of AM/PM system",
"default": "(based on Quasar lang language being used)",
"category": "behavior"
},
"default-date": {
"type": "String",
"desc": "The default date to use (in YYYY/MM/DD format) when model is unfilled (undefined or null)",
"default": "current day",
"examples": [
"1995/02/23"
],
"category": "model",
"addedIn": "v1.9.0"
},
"mask": {
"default": "HH:mm",
"examples": [ "HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "HH:mm MMMM Do, YYYY" ]
},
"options": {
"type": "Function",
"desc": "Optionally configure what time is the user allowed to set; Overridden by 'hour-options', 'minute-options' and 'second-options' if those are set; For best performance, reference it from your scope and do not define it inline",
"params": {
"hr": {
"type": "Number",
"desc": "Hour",
"examples": [ 15 ]
},
"min": {
"type": "Number",
"desc": "Minutes",
"examples": [ 38 ]
},
"sec": {
"type": "Number",
"desc": "Seconds",
"examples": [ 12 ]
}
},
"returns": null,
"examples": [
":options=\"(hr, min, sec) => hr <= 6\""
],
"category": "behavior"
},
"hour-options": {
"type": "Array",
"desc": "Optionally configure what hours is the user allowed to set; Overrides 'options' prop if that is also set",
"examples": [
":hour-options=\"[ 3, 6, 9 ]\""
],
"category": "behavior"
},
"minute-options": {
"type": "Array",
"desc": "Optionally configure what minutes is the user allowed to set; Overrides 'options' prop if that is also set",
"examples": [
":minute-options=\"[0, 15, 30, 45]\""
],
"category": "behavior"
},
"second-options": {
"type": "Array",
"desc": "Optionally configure what seconds is the user allowed to set; Overrides 'options' prop if that is also set",
"examples": [
":second-options=\"[0, 7, 10, 23]\""
],
"category": "behavior"
},
"with-seconds": {
"type": "Boolean",
"desc": "Allow the time to be set with seconds",
"category": "model|behavior"
},
"now-btn": {
"type": "Boolean",
"desc": "Display a button that selects the current time",
"category": "content"
}
},
"slots": {
"default": {
"desc": "This is where additional buttons can go",
"addedIn": "v1.2.8"
}
},
"events": {
"input": {
"extends": "input",
"params": {
"value": {
"type": "String"
},
"details": {
"type": "Object",
"desc": "Object of properties on the new model",
"definition": {
"year": {
"type": "Number",
"desc": "The year",
"__exemption": [ "examples" ]
},
"month": {
"type": "Number",
"desc": "The month",
"__exemption": [ "examples" ]
},
"day": {
"type": "Number",
"desc": "The day of the month",
"__exemption": [ "examples" ]
},
"hour": {
"type": "Number",
"desc": "The hour",
"__exemption": [ "examples" ]
},
"minute": {
"type": "Number",
"desc": "The minute",
"__exemption": [ "examples" ]
},
"second": {
"type": "Number",
"desc": "The second",
"__exemption": [ "examples" ]
},
"millisecond": {
"type": "Number",
"desc": "The millisecond",
"__exemption": [ "examples" ]
},
"changed": {
"type": "Boolean",
"desc": "Did the model change?",
"addedIn": "v1.1.1"
}
}
}
}
}
},
"methods": {
"setNow": {
"desc": "Change model to current moment",
"addedIn": "v1.1.7"
}
}
}