@propeller-commerce/propeller-v2-vue-ui 0.3.31 → 0.3.32
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9710,9 +9710,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
9710
9710
|
if (props.initialDate && !selectedDate.value) {
|
|
9711
9711
|
const dot = props.initialDate.lastIndexOf(".");
|
|
9712
9712
|
const normalized = dot !== -1 ? props.initialDate.substring(0, dot) + "Z" : props.initialDate;
|
|
9713
|
-
|
|
9713
|
+
const parsed = new Date(normalized);
|
|
9714
|
+
const isWeekend = !isNaN(parsed.getTime()) && (parsed.getDay() === 0 || parsed.getDay() === 6);
|
|
9715
|
+
const tiles = upcomingDates.value;
|
|
9716
|
+
const adopt = skipWeekends.value && isWeekend && tiles.length > 0 ? tiles[0] : normalized;
|
|
9717
|
+
selectedDate.value = adopt;
|
|
9714
9718
|
if (props.onDateSelect) {
|
|
9715
|
-
props.onDateSelect(
|
|
9719
|
+
props.onDateSelect(adopt);
|
|
9716
9720
|
}
|
|
9717
9721
|
}
|
|
9718
9722
|
},
|