@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/ui",
3
- "version": "0.82.0-2",
3
+ "version": "0.82.0-3",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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
- return dayjs(this.value).format(this.format);
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() {
@@ -83,7 +83,6 @@ export default {
83
83
 
84
84
  // only add the fraction digits on blur because on input it won't behave nicely
85
85
  if (this.format === 'currency' && this.event !== 'input') {
86
- console.log(1);
87
86
  options = {
88
87
  minimumFractionDigits: 2,
89
88
  maximumFractionDigits: 2,