range.vue 727 B

1234567891011121314151617181920212223
  1. <template>
  2. <div class="demo-range">
  3. <el-time-picker v-model="value1" is-range range-separator="To" start-placeholder="Start time" end-placeholder="End time" />
  4. <el-time-picker v-model="value2" is-range arrow-control range-separator="To" start-placeholder="Start time" end-placeholder="End time" />
  5. </div>
  6. </template>
  7. <script lang="ts" setup>
  8. import { ref } from 'vue'
  9. const value1 = ref<[Date, Date]>([new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)])
  10. const value2 = ref<[Date, Date]>([new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)])
  11. </script>
  12. <style>
  13. .demo-range .el-date-editor {
  14. margin: 8px;
  15. }
  16. .demo-range .el-range-separator {
  17. box-sizing: content-box;
  18. }
  19. </style>