feat: DatePickerRange에 z-index props 추가

This commit is contained in:
swcho
2025-07-10 15:34:37 +09:00
parent 9ab0302e08
commit b75caf4f7b
@@ -12,12 +12,14 @@ import { Popover, PopoverContent, PopoverTrigger } from "@common/components/ui";
type DatePickerRangeProps = {
placeholder?: string;
disabled?: boolean | ((date: Date) => boolean);
zIndex?: number; // z-index prop 추가
} & DayPickerSingleProps;
export function DatePickerRange({
className,
placeholder = "날짜 선택",
disabled,
zIndex,
...props
}: DatePickerRangeProps) {
return (
@@ -36,8 +38,8 @@ export function DatePickerRange({
)}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0">
<Calendar initialFocus classNames={{ cell: "rounded-md" }} {...props}
<PopoverContent className={cn("w-auto p-0", zIndex ? `!z-[${zIndex}]` : "")}>
<Calendar initialFocus classNames={{ cell: "rounded-md" }} {...props}
disabled={typeof disabled === "function" ? disabled : undefined}
/>
</PopoverContent>