diff --git a/apps/web/src/components/JalaliDateInput.vue b/apps/web/src/components/JalaliDateInput.vue index e9269ec..a087c5e 100644 --- a/apps/web/src/components/JalaliDateInput.vue +++ b/apps/web/src/components/JalaliDateInput.vue @@ -52,6 +52,8 @@ const hourColRef = ref(null); const minuteColRef = ref(null); const top = ref(0); const left = ref(0); +/** بالای مودال Ant (حدود ۱۰۰۰) تا تقویم پشت پنجره نماند */ +const popupZ = ref(120); const todayJ = dateToJalali(new Date()); const cursor = ref<{ jy: number; jm: number }>({ jy: todayJ.jy, jm: todayJ.jm }); const draftHour = ref(9); @@ -349,6 +351,15 @@ function place() { top.value = nextTop; } +function liftAboveOverlays() { + let z = 120; + for (const el of document.querySelectorAll('.ant-modal-wrap, .ant-drawer')) { + const zi = Number.parseInt(window.getComputedStyle(el).zIndex, 10); + if (Number.isFinite(zi)) z = Math.max(z, zi + 20); + } + popupZ.value = z; +} + function onWindowChange() { syncViewport(); if (open.value) place(); @@ -360,6 +371,7 @@ async function show() { calView.value = 'days'; clockFace.value = 'hour'; syncViewport(); + liftAboveOverlays(); open.value = true; await nextTick(); place(); @@ -554,7 +566,7 @@ onBeforeUnmount(() => { 'is-desktop': !isMobile, }" role="dialog" - :style="{ top: `${top}px`, left: `${left}px` }" + :style="{ top: `${top}px`, left: `${left}px`, zIndex: popupZ }" >