mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-14 10:00:58 +08:00
53 lines
1.0 KiB
Vue
53 lines
1.0 KiB
Vue
<template>
|
|
<div class="demo-datetime-picker">
|
|
<div class="block">
|
|
<el-date-picker
|
|
v-model="value1"
|
|
type="datetime"
|
|
placeholder="Pick a Date"
|
|
format="YYYY-MM-DD HH:mm:ss"
|
|
date-format="MMM DD, YYYY"
|
|
time-format="HH:mm"
|
|
/>
|
|
</div>
|
|
<div class="line" />
|
|
<div class="block">
|
|
<el-date-picker
|
|
v-model="value2"
|
|
type="datetimerange"
|
|
start-placeholder="Start date"
|
|
end-placeholder="End date"
|
|
format="YYYY-MM-DD HH:mm:ss"
|
|
date-format="YYYY/MM/DD ddd"
|
|
time-format="A hh:mm:ss"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const value1 = ref('')
|
|
const value2 = ref('')
|
|
</script>
|
|
|
|
<style scoped>
|
|
.demo-datetime-picker {
|
|
display: flex;
|
|
width: 100%;
|
|
padding: 0;
|
|
flex-wrap: wrap;
|
|
justify-content: space-around;
|
|
align-items: stretch;
|
|
}
|
|
.demo-datetime-picker .block {
|
|
padding: 30px 0;
|
|
text-align: center;
|
|
}
|
|
.line {
|
|
width: 1px;
|
|
background-color: var(--el-border-color);
|
|
}
|
|
</style>
|