@veritree/ui 0.82.0-2 → 0.82.0-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
:maximum-view="maximumView"
|
|
23
23
|
:show-edge-dates="showEdgeDates"
|
|
24
24
|
:disabled-dates="disabledDatesComputed"
|
|
25
|
+
:use-utc="useUtc"
|
|
25
26
|
@input="onInput"
|
|
26
27
|
>
|
|
27
28
|
<template #prevIntervalBtn>
|
|
@@ -46,6 +47,9 @@ import VTPopoverContent from './../Popover/VTPopoverContent.vue';
|
|
|
46
47
|
import Datepicker from '@sum.cumo/vue-datepicker';
|
|
47
48
|
import { IconChevronLeft, IconChevronRight } from '@veritree/icons';
|
|
48
49
|
import dayjs from 'dayjs';
|
|
50
|
+
import utc from 'dayjs/plugin/utc';
|
|
51
|
+
|
|
52
|
+
dayjs.extend(utc);
|
|
49
53
|
|
|
50
54
|
export default {
|
|
51
55
|
name: 'VTInputDate',
|
|
@@ -98,6 +102,10 @@ export default {
|
|
|
98
102
|
type: Boolean,
|
|
99
103
|
default: false,
|
|
100
104
|
},
|
|
105
|
+
useUtc: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: true,
|
|
108
|
+
},
|
|
101
109
|
},
|
|
102
110
|
|
|
103
111
|
computed: {
|
|
@@ -112,7 +120,13 @@ export default {
|
|
|
112
120
|
},
|
|
113
121
|
|
|
114
122
|
valueModelFormatted() {
|
|
115
|
-
|
|
123
|
+
let date = dayjs(this.value);
|
|
124
|
+
|
|
125
|
+
if (this.useUtc) {
|
|
126
|
+
date = date.utc();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return date.format(this.format);
|
|
116
130
|
},
|
|
117
131
|
|
|
118
132
|
disabledDatesComputed() {
|