hamzus-ui 0.0.168 → 0.0.170
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
|
@@ -53,6 +53,23 @@
|
|
|
53
53
|
let hour = ""
|
|
54
54
|
let min = ""
|
|
55
55
|
|
|
56
|
+
onMount(()=>{
|
|
57
|
+
if (value === "") return
|
|
58
|
+
|
|
59
|
+
const dateTimeData = value.split(" ");
|
|
60
|
+
|
|
61
|
+
const dateData = dateTimeData[0].split('-');
|
|
62
|
+
|
|
63
|
+
const day = parseInt(dateData[2]);
|
|
64
|
+
currentMonth = parseInt(dateData[1]);
|
|
65
|
+
currentYear = parseInt(dateData[0]);
|
|
66
|
+
|
|
67
|
+
selectedMonth = currentMonth
|
|
68
|
+
selectedYear = currentYear
|
|
69
|
+
|
|
70
|
+
handleUpdateValue(day, false)
|
|
71
|
+
})
|
|
72
|
+
|
|
56
73
|
function getYearList(startYear = 1997) {
|
|
57
74
|
const currentYear = new Date().getFullYear();
|
|
58
75
|
|
|
@@ -144,7 +161,7 @@
|
|
|
144
161
|
weeks = generateCalendarMatrix(currentYear, currentMonth - 1);
|
|
145
162
|
}
|
|
146
163
|
|
|
147
|
-
function handleUpdateValue(day) {
|
|
164
|
+
function handleUpdateValue(day, toggleDisplayAfter = true) {
|
|
148
165
|
if (day !== null) {
|
|
149
166
|
selectedDay = day;
|
|
150
167
|
selectedYear = currentYear;
|
|
@@ -168,7 +185,7 @@
|
|
|
168
185
|
onChange(value);
|
|
169
186
|
}
|
|
170
187
|
|
|
171
|
-
|
|
188
|
+
if (toggleDisplayAfter) toggleDisplay();
|
|
172
189
|
}
|
|
173
190
|
function handleUpdateHour(inputValue) {
|
|
174
191
|
|