bug: fixed calender modal stacking issue #209
Reference in New Issue
Block a user
Delete Branch "DeveshSingh/flotilla:fix/calender-modal-bug"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix #205: Calendar event form borked
Problem
The date picker calendar popup in the Create/Edit Event form rendered behind adjacent form fields (End date, Location, Time input), making it impossible to select dates without the calendar being obscured.
The
DateTimeInputcomponent had no stacking context, so the absolutely-positioned calendar popup fromdate-picker-sveltefollowed default DOM paint order — later siblings (End field, Location field) always rendered on top of earlier siblings' popups (Start field's calendar).What changed
Updated
src/lib/components/DateTimeInput.sveltefocus-within:z-modalon the root container so whichever date picker is actively focused dynamically elevates above all sibling fieldsz-popoveron the date input wrapper so the calendar popup renders above the adjacent time inputgroup+group-focus-within:opacity-0+group-focus-within:pointer-events-noneon the icon overlay so the calendar/clear icon hides and becomes non-interactive when the picker popup is open, preventing ghost clicks that would close the calendarpointer-events-autoon icon buttons so they remain clickable when the overlay is not in focus-within stateBehavior after fix
Manual verification
Scope
DateTimeInput.svelte)Looks good, only thing is can you use rhe z stack defined in the tailwind config file
Hey @hodlbod, I used z-modal and z-popover now, according to the tailwind config file
Hey @DeveshSingh, could you also update the PR description to reflect the Tailwind z-index changes? It still mentions z-50 and z-20.