@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260417070529 → 0.8.1-dev.20260417073058
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/dist/index.js +9 -7
- package/dist/index.mjs +9 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1882,13 +1882,15 @@ var DateTimeInput = (props) => {
|
|
|
1882
1882
|
let value;
|
|
1883
1883
|
let localvalue;
|
|
1884
1884
|
let timeZoneAbbr;
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1885
|
+
if (props.value !== void 0 && props.value !== null) {
|
|
1886
|
+
value = props.value;
|
|
1887
|
+
const now = /* @__PURE__ */ new Date();
|
|
1888
|
+
const offsetMinutes = now.getTimezoneOffset();
|
|
1889
|
+
const offsetMilliseconds = offsetMinutes * 60 * 1e3;
|
|
1890
|
+
const valDate = value.toString().includes("Z") ? new Date(value) : /* @__PURE__ */ new Date(value + "Z");
|
|
1891
|
+
const localDate = new Date(valDate.getTime() - offsetMilliseconds);
|
|
1892
|
+
timeZoneAbbr = now.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
1893
|
+
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
1892
1894
|
}
|
|
1893
1895
|
const handleKeyDown = (e) => {
|
|
1894
1896
|
if (e.key === "Backspace") {
|
package/dist/index.mjs
CHANGED
|
@@ -894,13 +894,15 @@ var DateTimeInput = (props) => {
|
|
|
894
894
|
let value;
|
|
895
895
|
let localvalue;
|
|
896
896
|
let timeZoneAbbr;
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
897
|
+
if (props.value !== void 0 && props.value !== null) {
|
|
898
|
+
value = props.value;
|
|
899
|
+
const now = /* @__PURE__ */ new Date();
|
|
900
|
+
const offsetMinutes = now.getTimezoneOffset();
|
|
901
|
+
const offsetMilliseconds = offsetMinutes * 60 * 1e3;
|
|
902
|
+
const valDate = value.toString().includes("Z") ? new Date(value) : /* @__PURE__ */ new Date(value + "Z");
|
|
903
|
+
const localDate = new Date(valDate.getTime() - offsetMilliseconds);
|
|
904
|
+
timeZoneAbbr = now.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
905
|
+
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
904
906
|
}
|
|
905
907
|
const handleKeyDown = (e) => {
|
|
906
908
|
if (e.key === "Backspace") {
|
package/package.json
CHANGED