|
|
@@ -1,20 +1,11 @@
|
|
|
<template>
|
|
|
<main class="d-flex align-center data-timing-range">
|
|
|
<div v-if="show" class="d-flex align-center" style="max-height: 100%">
|
|
|
- <span class="pl-2 mr-2 font-weight-bold on-neutral">
|
|
|
+ <span class="pl-2 mr-2 font-weight-bold on-neutral" style="min-width: 150px;">
|
|
|
{{ $t('period_choose') }}
|
|
|
</span>
|
|
|
|
|
|
- <!-- @see https://vue3datepicker.com/props/modes/#multi-calendars -->
|
|
|
- <VueDatePicker
|
|
|
- :model-value="datesRange"
|
|
|
- range
|
|
|
- multi-calendars
|
|
|
- :teleport="true"
|
|
|
- :alt-position="dateRangePickerAltPosition"
|
|
|
- :enable-time-picker="false"
|
|
|
- @update="updateDateTimeRange"
|
|
|
- />
|
|
|
+ <UiInputDateRangePicker v-model="datesRange" max-height="28" />
|
|
|
</div>
|
|
|
|
|
|
<v-btn
|
|
|
@@ -49,14 +40,11 @@ const { setDirty } = useFormStore()
|
|
|
const accessProfileStore = useAccessProfileStore()
|
|
|
const { em } = useEntityManager()
|
|
|
|
|
|
+
|
|
|
+
|
|
|
const start = accessProfileStore.historical.dateStart
|
|
|
const end = accessProfileStore.historical.dateStart
|
|
|
|
|
|
-const dateRangePickerAltPosition = (el: HTMLElement) => ({
|
|
|
- top: el.getBoundingClientRect().bottom,
|
|
|
- left: el.getBoundingClientRect().left - 100
|
|
|
-})
|
|
|
-
|
|
|
const datesRange: Ref<Array<Date | null>> = ref([
|
|
|
start ? new Date(start) : null,
|
|
|
end ? new Date(end) : null
|
|
|
@@ -104,45 +92,4 @@ if (accessProfileStore.historical.dateStart || accessProfileStore.historical.dat
|
|
|
border-width: 1px 1px 1px 0;
|
|
|
border-style: solid;
|
|
|
}
|
|
|
-
|
|
|
-.data-timing-range {
|
|
|
- max-height: 22px;
|
|
|
-
|
|
|
- :deep(.v-text-field) {
|
|
|
- padding-top: 0 !important;
|
|
|
- margin-top: 0 !important;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.v-input) {
|
|
|
- max-height: 22px;
|
|
|
- min-height: 22px;
|
|
|
- height: 22px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.v-icon) {
|
|
|
- max-height: 22px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.v-field__input) {
|
|
|
- font-size: 14px;
|
|
|
- width: 400px !important;
|
|
|
- padding: 0;
|
|
|
- max-height: 22px;
|
|
|
- min-height: 22px;
|
|
|
- height: 22px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.v-field-label) {
|
|
|
- top: 0;
|
|
|
- font-size: 14px;
|
|
|
- max-height: 22px;
|
|
|
- min-height: 22px;
|
|
|
- height: 22px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.v-input__prepend) {
|
|
|
- padding-top: 0;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|