| start-placeholder | placeholder for the start date in range mode | string | — | — |
| end-placeholder | placeholder for the end date in range mode | string | — | — |
| time-arrow-control | whether to pick time using arrow buttons | boolean | — | false |
| type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date |
| format | format of the displayed value in the input box | string | year `yyyy` month `MM` day `dd`, hour `HH`, minute `mm`, second `ss` | yyyy-MM-dd |
@@ -42,7 +42,7 @@ Provide a list of fixed time for users to choose.
Can pick an arbitrary time.
:::demo Use `el-time-picker` label, and you can limit the time range by using `selectableRange`.
:::demo Use `el-time-picker` label, and you can limit the time range by specifying `selectableRange`. By default, you can scroll the mouse wheel to pick time, alternatively you can use the control arrows when the `arrow-control` attribute is set.
```html
<template>
...
...
@@ -53,13 +53,22 @@ Can pick an arbitrary time.
}"
placeholder="Arbitrary time">
</el-time-picker>
<el-time-picker
arrow-control
v-model="value3"
:picker-options="{
selectableRange: '18:30:00 - 20:30:00'
}"
placeholder="Arbitrary time">
</el-time-picker>
</template>
<script>
exportdefault{
data(){
return{
value2:newDate(2016,9,10,18,40)
value2:newDate(2016,9,10,18,40),
value3:newDate(2016,9,10,18,40)
};
}
}
...
...
@@ -112,12 +121,20 @@ If start time is picked at first, then the end time will change accordingly.
Can pick an arbitrary time range.
:::demo We can pick a time range by adding an `is-range` attribute.
:::demo We can pick a time range by adding an `is-range` attribute. Also, `arrow-control` is supported in range mode.
```html
<template>
<el-time-picker
is-range
v-model="value3"
v-model="value4"
range-separator="To"
start-placeholder="Start time"
end-placeholder="End time">
</el-time-picker>
<el-time-picker
is-range
arrow-control
v-model="value5"
range-separator="To"
start-placeholder="Start time"
end-placeholder="End time">
...
...
@@ -128,7 +145,8 @@ Can pick an arbitrary time range.