mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
34 lines
694 B
Vue
34 lines
694 B
Vue
|
<template>
|
|||
|
<div class="demo-date-picker">
|
|||
|
<div class="block">
|
|||
|
<p>Component value:{{ value }}</p>
|
|||
|
<el-date-picker
|
|||
|
v-model="value"
|
|||
|
type="daterange"
|
|||
|
start-placeholder="Start date"
|
|||
|
end-placeholder="End date"
|
|||
|
:default-time="defaultTime"
|
|||
|
></el-date-picker>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
|
|||
|
<script lang="ts">
|
|||
|
import { defineComponent, ref } from 'vue'
|
|||
|
|
|||
|
export default defineComponent({
|
|||
|
setup() {
|
|||
|
const value = ref('')
|
|||
|
const defaultTime = ref([
|
|||
|
new Date(2000, 1, 1, 0, 0, 0),
|
|||
|
new Date(2000, 2, 1, 23, 59, 59),
|
|||
|
]) // '00:00:00', '23:59:59'
|
|||
|
|
|||
|
return {
|
|||
|
value,
|
|||
|
defaultTime,
|
|||
|
}
|
|||
|
},
|
|||
|
})
|
|||
|
</script>
|