@amirjalili1374/ui-kit 1.5.80 → 1.5.81
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/ui-kit.es.js
CHANGED
|
@@ -13974,16 +13974,45 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
|
13974
13974
|
});
|
|
13975
13975
|
const internalDisplayFormat = computed(() => {
|
|
13976
13976
|
if (props.displayFormat) return props.displayFormat;
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13977
|
+
switch (props.type) {
|
|
13978
|
+
case "datetime":
|
|
13979
|
+
return "jYYYY/jMM/jDD HH:mm";
|
|
13980
|
+
case "time":
|
|
13981
|
+
return "HH:mm";
|
|
13982
|
+
case "year":
|
|
13983
|
+
return "jYYYY";
|
|
13984
|
+
case "month":
|
|
13985
|
+
return "jMMMM jYYYY";
|
|
13986
|
+
default:
|
|
13987
|
+
return "jYYYY/jMM/jDD";
|
|
13988
|
+
}
|
|
13980
13989
|
});
|
|
13981
13990
|
const selectedDate = computed({
|
|
13982
13991
|
get: () => {
|
|
13983
|
-
if (props.
|
|
13984
|
-
|
|
13992
|
+
if (!props.modelValue) return "";
|
|
13993
|
+
if (props.mode === "range" && Array.isArray(props.modelValue)) {
|
|
13994
|
+
return props.modelValue;
|
|
13995
|
+
}
|
|
13996
|
+
if (typeof props.modelValue === "string" && props.modelValue.includes("T")) {
|
|
13997
|
+
const date = new Date(props.modelValue);
|
|
13998
|
+
if (!isNaN(date.getTime())) {
|
|
13999
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
14000
|
+
const y = date.getFullYear();
|
|
14001
|
+
const m = pad(date.getMonth() + 1);
|
|
14002
|
+
const d = pad(date.getDate());
|
|
14003
|
+
const h2 = pad(date.getHours());
|
|
14004
|
+
const min = pad(date.getMinutes());
|
|
14005
|
+
const s = pad(date.getSeconds());
|
|
14006
|
+
if (props.type === "datetime" || props.type === "time") {
|
|
14007
|
+
return `${y}-${m}-${d} ${h2}:${min}:${s}`;
|
|
14008
|
+
}
|
|
14009
|
+
return `${y}-${m}-${d}`;
|
|
14010
|
+
}
|
|
14011
|
+
}
|
|
14012
|
+
return props.modelValue;
|
|
13985
14013
|
},
|
|
13986
|
-
set: (value2) =>
|
|
14014
|
+
set: (value2) => {
|
|
14015
|
+
}
|
|
13987
14016
|
});
|
|
13988
14017
|
const formatOutput = (date) => {
|
|
13989
14018
|
if (!date) return "";
|
|
@@ -14041,7 +14070,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
|
14041
14070
|
};
|
|
14042
14071
|
}
|
|
14043
14072
|
});
|
|
14044
|
-
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-
|
|
14073
|
+
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-d9d904b6"]]);
|
|
14045
14074
|
const _hoisted_1$a = { class: "mb-6" };
|
|
14046
14075
|
const _hoisted_2$6 = { class: "text-subtitle-1 font-weight-medium mb-3" };
|
|
14047
14076
|
const _hoisted_3$4 = { class: "theme-toggle-container" };
|