Improved DateTimePicker
This commit is contained in:
parent
233b1cffe7
commit
a1d6903bcb
|
@ -28,9 +28,8 @@
|
|||
</template>
|
||||
</v-tooltip>
|
||||
<v-spacer />
|
||||
<DateTimePicker v-model="dateIn" class="ma-6" label="Início" />
|
||||
<DateTimePicker v-model="dateOut" class="ma-4" label="Fim" />
|
||||
<v-checkbox v-model="polling" label="Atualizar automaticamente" />
|
||||
<DateTimePicker v-model="dateIn" class="ma-2" label="Início" />
|
||||
<DateTimePicker v-model="dateOut" class="ma-2" label="Fim" />
|
||||
</v-toolbar>
|
||||
|
||||
<v-data-table
|
||||
|
@ -81,6 +80,10 @@
|
|||
</v-alert>
|
||||
</div>
|
||||
</v-data-table>
|
||||
<v-footer>
|
||||
<v-spacer />
|
||||
<v-switch v-model="polling" label="Atualizar automaticamente" />
|
||||
</v-footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
:label="label"
|
||||
:value="formattedDatetime"
|
||||
readonly
|
||||
append-icon="mdi-close"
|
||||
outlined
|
||||
hide-details
|
||||
@click:append="clear"
|
||||
v-on="on"
|
||||
>
|
||||
<template #progress>
|
||||
|
@ -26,7 +29,7 @@
|
|||
</template>
|
||||
|
||||
<v-card>
|
||||
<v-card-text class="px-0 py-0">
|
||||
<v-card-text>
|
||||
<v-tabs v-model="activeTab" fixed-tabs>
|
||||
<v-tab key="calendar">
|
||||
<slot name="dateIcon">
|
||||
|
@ -38,10 +41,14 @@
|
|||
<v-icon>mdi-clock</v-icon>
|
||||
</slot>
|
||||
</v-tab>
|
||||
|
||||
</v-tabs>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-tabs-items v-model="activeTab">
|
||||
<v-tab-item key="calendar">
|
||||
<v-date-picker
|
||||
v-model="date"
|
||||
scrollable
|
||||
v-bind="datePickerProps"
|
||||
full-width
|
||||
@input="showTimePicker"
|
||||
|
@ -56,7 +63,7 @@
|
|||
full-width
|
||||
></v-time-picker>
|
||||
</v-tab-item>
|
||||
</v-tabs>
|
||||
</v-tabs-items>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
@ -198,6 +205,14 @@ export default {
|
|||
this.date = format(initDateTime, DEFAULT_DATE_FORMAT)
|
||||
this.time = format(initDateTime, DEFAULT_TIME_FORMAT)
|
||||
},
|
||||
|
||||
clear() {
|
||||
this.date = null
|
||||
this.time = null
|
||||
|
||||
this.okHandler()
|
||||
},
|
||||
|
||||
okHandler() {
|
||||
this.resetPicker()
|
||||
this.$emit('input', this.selectedDatetime)
|
||||
|
|
Loading…
Reference in New Issue
Block a user