From cbc2e4ee8a1a51c9b28ea651151a3c2f1a236344 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 31 Oct 2026 10:16:02 +0330 Subject: [PATCH] fix(web): keep the Jalali picker above Ant modals The date and time panel was opening behind the new-task dialog because its layer sat under the modal. Co-authored-by: Cursor --- apps/web/src/components/JalaliDateInput.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 }" >