@onereach/ui-components 3.0.4-beta.2486.0 → 3.0.4-beta.2487.0

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.
Files changed (111) hide show
  1. package/dist/bundled/v2/{OrCardCollection-ad2240ac.js → OrCardCollection-a10920a3.js} +1 -1
  2. package/dist/bundled/v2/{OrDateTimePicker-60e1a7ee.js → OrDateTimePicker-11b6d4dd.js} +261 -165
  3. package/dist/bundled/v2/{OrMenu-cbb0c2c8.js → OrMenu-0c2c348c.js} +6 -1
  4. package/dist/bundled/v2/{OrPagination-cf47d71c.js → OrPagination-00ab6954.js} +1 -1
  5. package/dist/bundled/v2/{OrTabs-10f7e668.js → OrTabs-f7c9f754.js} +1 -1
  6. package/dist/bundled/v2/components/index.js +5 -5
  7. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  8. package/dist/bundled/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  9. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  10. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  11. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  12. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  13. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  14. package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +4 -4
  15. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  16. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  17. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  18. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  19. package/dist/bundled/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  20. package/dist/bundled/v2/components/or-menu-v3/index.js +1 -1
  21. package/dist/bundled/v2/components/or-pagination-v3/index.js +2 -2
  22. package/dist/bundled/v2/components/or-tabs-v3/index.js +2 -2
  23. package/dist/bundled/v2/index.js +6 -6
  24. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-61f92c57.js → OrCardCollection.vue_vue_type_script_lang-93c84377.js} +2 -2
  25. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-fb197c2f.js → OrDateTimePicker.vue_vue_type_script_lang-b9bc77aa.js} +243 -163
  26. package/dist/bundled/v3/{OrMenu-89afef68.js → OrMenu-101f1c62.js} +1 -1
  27. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-f6748a99.js → OrMenu.vue_vue_type_script_lang-7ba15d1d.js} +6 -1
  28. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-7673a00e.js → OrPagination.vue_vue_type_script_lang-d3e6732f.js} +2 -2
  29. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ebd2a59d.js → OrTabs.vue_vue_type_script_lang-513b1e98.js} +2 -2
  30. package/dist/bundled/v3/components/index.js +6 -6
  31. package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
  32. package/dist/bundled/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  33. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  34. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  35. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  36. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  37. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  38. package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +5 -5
  39. package/dist/{esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  40. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  41. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  42. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  43. package/dist/bundled/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  44. package/dist/bundled/v3/components/or-menu-v3/index.js +1 -1
  45. package/dist/bundled/v3/components/or-pagination-v3/index.js +3 -3
  46. package/dist/bundled/v3/components/or-tabs-v3/index.js +3 -3
  47. package/dist/bundled/v3/index.js +36 -22
  48. package/dist/esm/v2/{OrCardCollection-662d5727.js → OrCardCollection-54079e79.js} +1 -1
  49. package/dist/esm/v2/{OrDateTimePicker-4b650aca.js → OrDateTimePicker-7411ea1f.js} +266 -170
  50. package/dist/esm/v2/{OrMenu-47b319a6.js → OrMenu-18a7f179.js} +6 -1
  51. package/dist/esm/v2/{OrPagination-4d330d4f.js → OrPagination-16f6d75b.js} +1 -1
  52. package/dist/esm/v2/{OrTabs-f0e4db08.js → OrTabs-18df1ce9.js} +1 -1
  53. package/dist/esm/v2/components/index.js +5 -5
  54. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  55. package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  56. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  57. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  58. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  59. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  60. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  61. package/dist/esm/v2/components/or-date-time-picker-v3/index.js +2 -2
  62. package/dist/esm/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  63. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  64. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  65. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  66. package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  67. package/dist/esm/v2/components/or-menu-v3/index.js +1 -1
  68. package/dist/esm/v2/components/or-pagination-v3/index.js +2 -2
  69. package/dist/esm/v2/components/or-tabs-v3/index.js +2 -2
  70. package/dist/esm/v2/index.js +5 -5
  71. package/dist/esm/v3/{OrCardCollection-aa7f0c81.js → OrCardCollection-b937aa7a.js} +1 -1
  72. package/dist/esm/v3/{OrDateTimePicker-3e2dc067.js → OrDateTimePicker-966d5b1d.js} +267 -173
  73. package/dist/esm/v3/{OrMenu-053a9ab7.js → OrMenu-70cee836.js} +6 -1
  74. package/dist/esm/v3/{OrPagination-f2d104d9.js → OrPagination-7f4ed166.js} +1 -1
  75. package/dist/esm/v3/{OrTabs-d9e2a07e.js → OrTabs-0a5c80be.js} +1 -1
  76. package/dist/esm/v3/components/index.js +5 -5
  77. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  78. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  79. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  80. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  81. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  82. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  83. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  84. package/dist/esm/v3/components/or-date-time-picker-v3/index.js +2 -2
  85. package/dist/{bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  86. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  87. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  88. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  89. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  90. package/dist/esm/v3/components/or-menu-v3/index.js +1 -1
  91. package/dist/esm/v3/components/or-pagination-v3/index.js +2 -2
  92. package/dist/esm/v3/components/or-tabs-v3/index.js +2 -2
  93. package/dist/esm/v3/index.js +5 -5
  94. package/package.json +2 -2
  95. package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +17 -8
  96. package/src/components/or-date-time-picker-v3/hooks/useDefaultDate.ts +3 -0
  97. package/src/components/or-date-time-picker-v3/hooks/useDefaultHours.ts +3 -0
  98. package/src/components/or-date-time-picker-v3/hooks/useDefaultMinutes.ts +3 -0
  99. package/src/components/or-date-time-picker-v3/hooks/useDefaultMonth.ts +3 -0
  100. package/src/components/or-date-time-picker-v3/hooks/useDefaultYear.ts +3 -0
  101. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue +162 -0
  102. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.ts +28 -0
  103. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +101 -79
  104. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +58 -42
  105. package/src/components/or-menu-v3/OrMenu.vue +3 -0
  106. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  107. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  108. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  109. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  110. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue +0 -63
  111. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.ts +0 -10
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, computed, reactive } from 'vue-demi';
2
- import { openBlock, createElementBlock, normalizeClass, resolveComponent, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, renderSlot, withModifiers, Fragment, renderList, createBlock, resolveDirective, createCommentVNode, withDirectives, mergeProps, pushScopeId, popScopeId } from 'vue';
1
+ import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
2
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, resolveDirective, createCommentVNode, withDirectives, mergeProps, pushScopeId, popScopeId } from 'vue';
3
3
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
4
4
  import { s as script$f, I as InputBoxSize } from './OrInputBox-901887a1.js';
5
5
  import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e1f90e0a.js';
@@ -9,21 +9,54 @@ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34
9
9
  import { s as script$d } from './OrError-c01d0c29.js';
10
10
  import { s as script$e } from './OrHint-06ab89d7.js';
11
11
  import { s as script$a } from './OrIconButton-e3f4d060.js';
12
- import { s as script$7 } from './OrLabel-4da56db0.js';
12
+ import { s as script$8 } from './OrLabel-4da56db0.js';
13
13
  import { s as script$g } from './OrPopover-3ac8f589.js';
14
- import { s as script$8 } from './OrButton-5a850657.js';
14
+ import { s as script$7 } from './OrButton-5a850657.js';
15
15
  import { s as script$9 } from './OrIcon-62793572.js';
16
16
  import { s as script$c } from './OrMenuItem-dbee450f.js';
17
- import { s as script$b } from './OrMenu-053a9ab7.js';
17
+ import { s as script$b } from './OrMenu-70cee836.js';
18
18
 
19
- const DateTimePickerDateSelect = [
19
+ function useDefaultDate() {
20
+ return new Date().getUTCDate();
21
+ }
22
+
23
+ function useDefaultHours() {
24
+ return 0;
25
+ }
26
+
27
+ function useDefaultMinutes() {
28
+ return 0;
29
+ }
30
+
31
+ function useDefaultMonth() {
32
+ return new Date().getUTCMonth();
33
+ }
34
+
35
+ function useDefaultYear() {
36
+ return new Date().getUTCFullYear();
37
+ }
38
+
39
+ const DateTimePickerDaySelect = [
20
40
  // Layout
21
41
  'layout-column',
22
42
  // Spacing
23
43
  'px-md', 'py-md', 'gap-sm'];
44
+ const DateTimePickerDaySelectButtonGroup = [
45
+ // Layout
46
+ 'grid', 'grid-cols-7'];
47
+ const DateTimePickerDaySelectButtonGroupItem = [
48
+ // Box
49
+ 'min-w-fit',
50
+ // Spacing
51
+ '!px-sm', '!py-sm',
52
+ // Typography
53
+ 'typography-caption-regular'];
24
54
 
25
55
  var script$6 = defineComponent({
26
- name: 'OrDateTimePickerDateSelect',
56
+ name: 'OrDateTimePickerDaySelect',
57
+ components: {
58
+ OrButton: script$7
59
+ },
27
60
  model: {
28
61
  prop: 'modelValue',
29
62
  event: 'update:modelValue'
@@ -40,31 +73,77 @@ var script$6 = defineComponent({
40
73
  // Refs
41
74
  const root = ref();
42
75
  // Styles
43
- const rootStyles = computed(() => ['or-date-time-picker-date-select', ...DateTimePickerDateSelect]);
76
+ const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
77
+ const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
78
+ const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
44
79
  // State
45
80
  const proxyModelValue = computed({
46
- get: () => props.modelValue,
81
+ get: () => {
82
+ var _a;
83
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
84
+ },
47
85
  set: value => {
48
86
  context.emit('update:modelValue', value);
49
87
  }
50
88
  });
89
+ const dayOptions = computed(() => {
90
+ const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
91
+ const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
92
+ const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
93
+ const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
94
+ return (() => {
95
+ let options = [],
96
+ value = calendarStartDate;
97
+ while (Number(value) !== Number(calendarEndDate)) {
98
+ options = [...options, value];
99
+ value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
100
+ }
101
+ return options;
102
+ })();
103
+ });
104
+ // Methods
105
+ function formatDay(value) {
106
+ return value.toLocaleString('default', {
107
+ day: 'numeric',
108
+ timeZone: 'UTC'
109
+ });
110
+ }
51
111
  return {
52
112
  root,
53
113
  rootStyles,
54
- proxyModelValue
114
+ buttonGroupStyles,
115
+ buttonGroupItemStyles,
116
+ proxyModelValue,
117
+ dayOptions,
118
+ formatDay
55
119
  };
56
120
  }
57
121
  });
58
122
 
59
123
  function render$6(_ctx, _cache, $props, $setup, $data, $options) {
124
+ const _component_OrButton = resolveComponent("OrButton");
60
125
  return openBlock(), createElementBlock("div", {
61
126
  ref: "root",
62
127
  class: normalizeClass(_ctx.rootStyles)
63
- }, " Calendar ", 2 /* CLASS */);
128
+ }, [createElementVNode("div", {
129
+ class: normalizeClass(_ctx.buttonGroupStyles)
130
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
131
+ return openBlock(), createBlock(_component_OrButton, {
132
+ key: Number(value),
133
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
134
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
135
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
136
+ onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
137
+ }, {
138
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDay(value)), 1 /* TEXT */)]),
139
+
140
+ _: 2 /* DYNAMIC */
141
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
142
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
64
143
  }
65
144
 
66
145
  script$6.render = render$6;
67
- script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue";
146
+ script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue";
68
147
 
69
148
  const DateTimePickerMobileControl = [
70
149
  // Layout
@@ -80,7 +159,7 @@ const DateTimePickerMobileControlContent = [
80
159
  var script$5 = defineComponent({
81
160
  name: 'OrDateTimePickerMobileControl',
82
161
  components: {
83
- OrLabel: script$7
162
+ OrLabel: script$8
84
163
  },
85
164
  props: {
86
165
  label: {
@@ -129,7 +208,7 @@ const DateTimePickerMonthSelect = [
129
208
  var script$4 = defineComponent({
130
209
  name: 'OrDateTimePickerMonthSelect',
131
210
  components: {
132
- OrButton: script$8,
211
+ OrButton: script$7,
133
212
  OrIcon: script$9,
134
213
  OrIconButton: script$a,
135
214
  OrMenu: script$b,
@@ -150,107 +229,99 @@ var script$4 = defineComponent({
150
229
  setup(props, context) {
151
230
  // Refs
152
231
  const root = ref();
153
- const monthButton = ref();
154
232
  const yearButton = ref();
233
+ const monthButton = ref();
234
+ const yearButtonRoot = computed(() => {
235
+ var _a;
236
+ return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
237
+ });
155
238
  const monthButtonRoot = computed(() => {
156
239
  var _a;
157
240
  return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
158
241
  });
159
- const yearButtonRoot = computed(() => {
242
+ const yearMenu = ref();
243
+ const monthMenu = ref();
244
+ const yearMenuState = computed(() => {
160
245
  var _a;
161
- return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
246
+ return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
247
+ });
248
+ const monthMenuState = computed(() => {
249
+ var _a;
250
+ return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
162
251
  });
163
- const monthMenu = ref();
164
- const yearMenu = ref();
165
- // const monthMenuState = computed(() => monthMenu.value?.state);
166
- // const yearMenuState = computed(() => yearMenu.value?.state);
167
252
  // Styles
168
253
  const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
169
254
  // State
170
255
  const proxyModelValue = computed({
171
- get: () => props.modelValue,
172
- set: value => {
173
- context.emit('update:modelValue', value);
174
- }
175
- });
176
- const yearValue = computed({
177
256
  get: () => {
178
- var _a, _b;
179
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : new Date().getUTCFullYear();
257
+ var _a;
258
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
180
259
  },
181
260
  set: value => {
182
- var _a, _b, _c, _d, _e, _f, _g, _h;
183
- proxyModelValue.value = new Date(Date.UTC(value, (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMonth()) !== null && _b !== void 0 ? _b : monthValue.value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
184
- }
185
- });
186
- const monthValue = computed({
187
- get: () => {
188
- var _a, _b;
189
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMonth()) !== null && _b !== void 0 ? _b : new Date().getUTCMonth();
190
- },
191
- set: value => {
192
- var _a, _b, _c, _d, _e, _f, _g, _h;
193
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : yearValue.value, value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
261
+ context.emit('update:modelValue', value);
194
262
  }
195
263
  });
196
- const yearLabel = computed(() => {
197
- var _a;
198
- return (_a = yearOptions.find(({
199
- value
200
- }) => value === yearValue.value)) === null || _a === void 0 ? void 0 : _a.label;
201
- });
202
- const monthLabel = computed(() => {
203
- var _a;
204
- return (_a = monthOptions.find(({
205
- value
206
- }) => value === monthValue.value)) === null || _a === void 0 ? void 0 : _a.label;
207
- });
208
- const yearOptions = Array.from({
209
- length: 100
210
- }, (_value, index) => {
211
- const year = new Date().getUTCFullYear() - index;
212
- return {
213
- value: year,
214
- label: new Date(year, monthValue.value).toLocaleString([], {
215
- year: 'numeric'
216
- })
217
- };
264
+ const yearOptions = computed(() => {
265
+ return Array.from({
266
+ length: 11
267
+ }).map((_value, index, {
268
+ length
269
+ }) => {
270
+ const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
271
+ return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
272
+ });
218
273
  });
219
- const monthOptions = Array.from({
220
- length: 12
221
- }, (_value, index) => {
222
- const month = index;
223
- return {
224
- value: month,
225
- label: new Date(yearValue.value, month).toLocaleString([], {
226
- month: 'long'
227
- })
228
- };
274
+ const monthOptions = computed(() => {
275
+ return Array.from({
276
+ length: 12
277
+ }, (_value, index) => {
278
+ const value = index;
279
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
280
+ });
229
281
  });
282
+ // Methods
283
+ function goToNextMonth() {
284
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
285
+ }
286
+ function goToPreviousMonth() {
287
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
288
+ }
289
+ function formatYear(value) {
290
+ return value.toLocaleString('default', {
291
+ year: 'numeric',
292
+ timeZone: 'UTC'
293
+ });
294
+ }
295
+ function formatMonth(value) {
296
+ return value.toLocaleString('default', {
297
+ month: 'long',
298
+ timeZone: 'UTC'
299
+ });
300
+ }
230
301
  return {
231
302
  root,
232
- monthButton,
233
303
  yearButton,
234
- monthButtonRoot,
304
+ monthButton,
235
305
  yearButtonRoot,
236
- monthMenu,
306
+ monthButtonRoot,
237
307
  yearMenu,
238
- // monthMenuState,
239
- // yearMenuState,
308
+ monthMenu,
309
+ yearMenuState,
310
+ monthMenuState,
240
311
  rootStyles,
241
312
  proxyModelValue,
242
- yearValue,
243
- monthValue,
244
- yearLabel,
245
- monthLabel,
246
313
  yearOptions,
247
- monthOptions
314
+ monthOptions,
315
+ goToNextMonth,
316
+ goToPreviousMonth,
317
+ formatYear,
318
+ formatMonth
248
319
  };
249
320
  }
250
321
  });
251
322
 
252
323
  const _hoisted_1$1 = {
253
- class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-md'])
324
+ class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
254
325
  };
255
326
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
256
327
  const _component_OrIconButton = resolveComponent("OrIconButton");
@@ -263,68 +334,70 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
263
334
  class: normalizeClass(_ctx.rootStyles)
264
335
  }, [createVNode(_component_OrIconButton, {
265
336
  icon: 'chevron_left',
266
- onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.monthValue = _ctx.monthValue - 1, ["stop"]))
337
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
267
338
  }), createElementVNode("div", _hoisted_1$1, [createVNode(_component_OrButton, {
268
- ref: "monthButton",
339
+ ref: "yearButton",
269
340
  variant: 'link',
270
341
  color: 'inherit',
271
- onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
342
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
272
343
  }, {
273
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.monthLabel) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
274
- icon: 'arrow_drop_down'
275
- })]),
344
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
345
+ icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
346
+ }, null, 8 /* PROPS */, ["icon"])]),
276
347
  _: 1 /* STABLE */
277
348
  }, 512 /* NEED_PATCH */), createVNode(_component_OrButton, {
278
- ref: "yearButton",
349
+ ref: "monthButton",
279
350
  variant: 'link',
280
351
  color: 'inherit',
281
- onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
352
+ onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
282
353
  }, {
283
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.yearLabel) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
284
- icon: 'arrow_drop_down'
285
- })]),
354
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
355
+ icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
356
+ }, null, 8 /* PROPS */, ["icon"])]),
286
357
  _: 1 /* STABLE */
287
358
  }, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
288
- ref: "monthMenu",
289
- trigger: _ctx.monthButtonRoot
359
+ ref: "yearMenu",
360
+ trigger: _ctx.yearButtonRoot
290
361
  }, {
291
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, option => {
362
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
292
363
  return openBlock(), createBlock(_component_OrMenuItem, {
293
- key: option.value,
364
+ key: Number(value),
365
+ selected: Number(value) === Number(_ctx.proxyModelValue),
294
366
  onClick: withModifiers($event => {
295
- _ctx.monthValue = option.value;
296
- _ctx.monthMenu.close();
367
+ _ctx.proxyModelValue = value;
368
+ _ctx.yearMenu.close();
297
369
  }, ["stop"])
298
370
  }, {
299
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
371
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
300
372
 
301
373
  _: 2 /* DYNAMIC */
302
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
374
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
303
375
  }), 128 /* KEYED_FRAGMENT */))]),
304
376
 
305
377
  _: 1 /* STABLE */
306
378
  }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
307
- ref: "yearMenu",
308
- trigger: _ctx.yearButtonRoot
379
+ ref: "monthMenu",
380
+ trigger: _ctx.monthButtonRoot
309
381
  }, {
310
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, option => {
382
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
311
383
  return openBlock(), createBlock(_component_OrMenuItem, {
312
- key: option.value,
384
+ key: Number(value),
385
+ selected: Number(value) === Number(_ctx.proxyModelValue),
313
386
  onClick: withModifiers($event => {
314
- _ctx.yearValue = option.value;
315
- _ctx.yearMenu.close();
387
+ _ctx.proxyModelValue = value;
388
+ _ctx.monthMenu.close();
316
389
  }, ["stop"])
317
390
  }, {
318
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
391
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
319
392
 
320
393
  _: 2 /* DYNAMIC */
321
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
394
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
322
395
  }), 128 /* KEYED_FRAGMENT */))]),
323
396
 
324
397
  _: 1 /* STABLE */
325
398
  }, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
326
399
  icon: 'chevron_right',
327
- onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.monthValue = _ctx.monthValue + 1, ["stop"]))
400
+ onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
328
401
  })], 2 /* CLASS */);
329
402
  }
330
403
 
@@ -342,7 +415,7 @@ const DateTimePickerPopoverFooter = [
342
415
  var script$3 = defineComponent({
343
416
  name: 'OrDateTimePickerPopoverFooter',
344
417
  components: {
345
- OrButton: script$8
418
+ OrButton: script$7
346
419
  },
347
420
  emits: ['resolve', 'reject'],
348
421
  expose: ['root'],
@@ -435,7 +508,7 @@ const DateTimePickerTimeSelectButtonGroupItem = [
435
508
  var script$1 = defineComponent({
436
509
  name: 'OrDateTimePickerTimeSelect',
437
510
  components: {
438
- OrButton: script$8
511
+ OrButton: script$7
439
512
  },
440
513
  model: {
441
514
  prop: 'modelValue',
@@ -458,53 +531,53 @@ var script$1 = defineComponent({
458
531
  const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
459
532
  // State
460
533
  const proxyModelValue = computed({
461
- get: () => props.modelValue,
462
- set: value => {
463
- context.emit('update:modelValue', value);
464
- }
465
- });
466
- const hoursValue = computed({
467
534
  get: () => {
468
- var _a, _b;
469
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCHours()) !== null && _b !== void 0 ? _b : 0;
535
+ var _a;
536
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
470
537
  },
471
538
  set: value => {
472
- var _a, _b, _c, _d, _e, _f, _g, _h;
473
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, value, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : minutesValue.value));
539
+ context.emit('update:modelValue', value);
474
540
  }
475
541
  });
476
- const minutesValue = computed({
477
- get: () => {
478
- var _a, _b;
479
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMinutes()) !== null && _b !== void 0 ? _b : 0;
480
- },
481
- set: value => {
482
- var _a, _b, _c, _d, _e, _f, _g, _h;
483
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCHours()) !== null && _h !== void 0 ? _h : hoursValue.value, value));
484
- }
542
+ const hoursOptions = computed(() => {
543
+ return Array.from({
544
+ length: 24
545
+ }, (_value, index) => {
546
+ const value = index;
547
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
548
+ });
549
+ });
550
+ const minutesOptions = computed(() => {
551
+ return Array.from({
552
+ length: 60
553
+ }, (_value, index) => {
554
+ const value = index;
555
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
556
+ });
485
557
  });
486
- const hoursOptions = Array.from({
487
- length: 24
488
- }, (_value, index) => ({
489
- value: index,
490
- label: String(index).padStart(2, '0')
491
- }));
492
- const minutesOptions = Array.from({
493
- length: 60
494
- }, (_value, index) => ({
495
- value: index,
496
- label: String(index).padStart(2, '0')
497
- }));
558
+ // Methods
559
+ function formatHours(value) {
560
+ return value.toLocaleString('default', {
561
+ hour: '2-digit',
562
+ timeZone: 'UTC'
563
+ });
564
+ }
565
+ function formatMinutes(value) {
566
+ return value.toLocaleString('default', {
567
+ minute: '2-digit',
568
+ timeZone: 'UTC'
569
+ });
570
+ }
498
571
  return {
499
572
  root,
500
573
  rootStyles,
501
574
  buttonGroupStyles,
502
575
  buttonGroupItemStyles,
503
576
  proxyModelValue,
504
- hoursValue,
505
- minutesValue,
506
577
  hoursOptions,
507
- minutesOptions
578
+ minutesOptions,
579
+ formatHours,
580
+ formatMinutes
508
581
  };
509
582
  }
510
583
  });
@@ -516,29 +589,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
516
589
  class: normalizeClass(_ctx.rootStyles)
517
590
  }, [createElementVNode("div", {
518
591
  class: normalizeClass(_ctx.buttonGroupStyles)
519
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, option => {
592
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
520
593
  return openBlock(), createBlock(_component_OrButton, {
521
- key: option.value,
594
+ key: Number(value),
522
595
  class: normalizeClass(_ctx.buttonGroupItemStyles),
523
- variant: _ctx.hoursValue === option.value ? 'contained' : 'text',
524
- color: _ctx.hoursValue === option.value ? 'primary' : 'inherit',
525
- onClick: withModifiers($event => _ctx.hoursValue = option.value, ["stop"])
596
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
597
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
598
+ onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
526
599
  }, {
527
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
600
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
528
601
 
529
602
  _: 2 /* DYNAMIC */
530
603
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
531
604
  }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
532
605
  class: normalizeClass(_ctx.buttonGroupStyles)
533
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, option => {
606
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
534
607
  return openBlock(), createBlock(_component_OrButton, {
535
- key: option.value,
608
+ key: Number(value),
536
609
  class: normalizeClass(_ctx.buttonGroupItemStyles),
537
- variant: _ctx.minutesValue === option.value ? 'contained' : 'text',
538
- color: _ctx.minutesValue === option.value ? 'primary' : 'inherit',
539
- onClick: withModifiers($event => _ctx.minutesValue = option.value, ["stop"])
610
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
611
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
612
+ onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
540
613
  }, {
541
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
614
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
542
615
 
543
616
  _: 2 /* DYNAMIC */
544
617
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
@@ -560,7 +633,7 @@ const DateTimePickerControl = [
560
633
  var script = defineComponent({
561
634
  name: 'OrDateTimePicker',
562
635
  components: {
563
- OrDateTimePickerDateSelect: script$6,
636
+ OrDateTimePickerDaySelect: script$6,
564
637
  OrDateTimePickerMobileControl: script$5,
565
638
  OrDateTimePickerMonthSelect: script$4,
566
639
  OrDateTimePickerPopoverFooter: script$3,
@@ -570,7 +643,7 @@ var script = defineComponent({
570
643
  OrHint: script$e,
571
644
  OrIconButton: script$a,
572
645
  OrInputBox: script$f,
573
- OrLabel: script$7,
646
+ OrLabel: script$8,
574
647
  OrPopover: script$g
575
648
  },
576
649
  directives: {
@@ -651,6 +724,12 @@ var script = defineComponent({
651
724
  context.emit('update:modelValue', value);
652
725
  }
653
726
  });
727
+ const draftModelValue = ref();
728
+ watch(proxyModelValue, value => {
729
+ draftModelValue.value = value;
730
+ }, {
731
+ immediate: true
732
+ });
654
733
  // Methods
655
734
  function toggleDatePopover() {
656
735
  if (!props.readonly && !props.disabled) {
@@ -700,6 +779,7 @@ var script = defineComponent({
700
779
  controlStyles,
701
780
  controlAttributes,
702
781
  proxyModelValue,
782
+ draftModelValue,
703
783
  toggleDatePopover,
704
784
  toggleTimePopover,
705
785
  closeDatePopover,
@@ -722,7 +802,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
722
802
  const _component_OrDateTimePickerMobileControl = resolveComponent("OrDateTimePickerMobileControl");
723
803
  const _component_OrDateTimePickerPopoverHeader = resolveComponent("OrDateTimePickerPopoverHeader");
724
804
  const _component_OrDateTimePickerMonthSelect = resolveComponent("OrDateTimePickerMonthSelect");
725
- const _component_OrDateTimePickerDateSelect = resolveComponent("OrDateTimePickerDateSelect");
805
+ const _component_OrDateTimePickerDaySelect = resolveComponent("OrDateTimePickerDaySelect");
726
806
  const _component_OrDateTimePickerPopoverFooter = resolveComponent("OrDateTimePickerPopoverFooter");
727
807
  const _component_OrPopover = resolveComponent("OrPopover");
728
808
  const _component_OrDateTimePickerTimeSelect = resolveComponent("OrDateTimePickerTimeSelect");
@@ -790,13 +870,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
790
870
 
791
871
  _: 1 /* STABLE */
792
872
  }), createVNode(_component_OrDateTimePickerMonthSelect, {
793
- modelValue: _ctx.proxyModelValue,
794
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxyModelValue = $event)
795
- }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrDateTimePickerDateSelect, {
796
- modelValue: _ctx.proxyModelValue,
797
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxyModelValue = $event)
873
+ modelValue: _ctx.draftModelValue,
874
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draftModelValue = $event)
875
+ }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrDateTimePickerDaySelect, {
876
+ modelValue: _ctx.draftModelValue,
877
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.draftModelValue = $event)
798
878
  }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
799
- onReject: _cache[2] || (_cache[2] = $event => _ctx.closeDatePopover())
879
+ onResolve: _cache[2] || (_cache[2] = $event => {
880
+ _ctx.proxyModelValue = _ctx.draftModelValue;
881
+ _ctx.datePopover.close();
882
+ }),
883
+ onReject: _cache[3] || (_cache[3] = $event => {
884
+ _ctx.draftModelValue = _ctx.proxyModelValue;
885
+ _ctx.datePopover.close();
886
+ })
800
887
  })]),
801
888
  _: 1 /* STABLE */
802
889
  }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrPopover, {
@@ -820,10 +907,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
820
907
 
821
908
  _: 1 /* STABLE */
822
909
  }), createVNode(_component_OrDateTimePickerTimeSelect, {
823
- modelValue: _ctx.proxyModelValue,
824
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.proxyModelValue = $event)
910
+ modelValue: _ctx.draftModelValue,
911
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.draftModelValue = $event)
825
912
  }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
826
- onReject: _cache[4] || (_cache[4] = $event => _ctx.closeTimePopover())
913
+ onResolve: _cache[5] || (_cache[5] = $event => {
914
+ _ctx.proxyModelValue = _ctx.draftModelValue;
915
+ _ctx.timePopover.close();
916
+ }),
917
+ onReject: _cache[6] || (_cache[6] = $event => {
918
+ _ctx.draftModelValue = _ctx.proxyModelValue;
919
+ _ctx.timePopover.close();
920
+ })
827
921
  })]),
828
922
  _: 1 /* STABLE */
829
923
  }, 8 /* PROPS */, ["trigger"]), _hoisted_3, createElementVNode("div", _hoisted_4, [_ctx.modelValue ? (openBlock(), createBlock(_component_OrIconButton, {
@@ -831,7 +925,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
831
925
  icon: 'close',
832
926
  color: 'inherit',
833
927
  disabled: _ctx.readonly || _ctx.disabled,
834
- onClick: _cache[5] || (_cache[5] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
928
+ onClick: _cache[7] || (_cache[7] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
835
929
  }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)])]),
836
930
  _: 1 /* STABLE */
837
931
  }, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), !_ctx.error ? (openBlock(), createElementBlock(Fragment, {