y200subcontrols 0.0.326 → 0.0.328
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.
|
@@ -26,7 +26,10 @@ $: {
|
|
|
26
26
|
const year = value.getFullYear();
|
|
27
27
|
const month = value.getMonth() + 1;
|
|
28
28
|
const day = value.getDate();
|
|
29
|
-
|
|
29
|
+
const hour = padZero(value.getHours());
|
|
30
|
+
const minute = padZero(value.getMinutes());
|
|
31
|
+
const second = padZero(value.getSeconds());
|
|
32
|
+
_value = `${year}-${padZero(month)}-${padZero(day)}T${hour}:${minute}:${second}`;
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
const dispatch = createEventDispatcher();
|
|
@@ -53,11 +56,16 @@ function handleChange(event) {
|
|
|
53
56
|
});
|
|
54
57
|
return;
|
|
55
58
|
}
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
59
|
+
console.log(_value);
|
|
60
|
+
const parts = _value.split("T");
|
|
61
|
+
const datePart = parts[0].split("-");
|
|
62
|
+
const year = Number(datePart[0]);
|
|
63
|
+
const month = Number(datePart[1]);
|
|
64
|
+
const dayOfMonth = Number(datePart[2]);
|
|
65
|
+
const timeParts = parts[1].split(":");
|
|
66
|
+
const hours = Number(timeParts[0]);
|
|
67
|
+
const minutes = Number(timeParts[1]);
|
|
68
|
+
const _date = new Date(year, month - 1, dayOfMonth, hours, minutes);
|
|
61
69
|
value = _date;
|
|
62
70
|
dispatch("dateChanged", {
|
|
63
71
|
date: _date
|