Revert "feat: DatePicker 컴포넌트 zIndex props 추가"

This reverts commit 52a5650ca5.
This commit is contained in:
swcho
2025-07-09 15:29:57 +09:00
parent 17f6e640a6
commit b3a69bf2ef
@@ -2,7 +2,7 @@ import "./date-picker.css";
import { format } from "date-fns";
import { CalendarIcon } from "lucide-react";
import type { DayPicker } from "react-day-picker";
import type { DayPickerSingleProps } from "react-day-picker";
import { cn } from "../../lib/utils";
import { Button } from "../button";
@@ -12,15 +12,12 @@ import { Popover, PopoverContent, PopoverTrigger } from "../popover";
type DatePickerProps = {
placeholder?: string;
disabled?: boolean;
selected?: Date;
zIndex?: number; // z-index prop 추가
} & React.ComponentProps<typeof DayPicker>;
} & DayPickerSingleProps;
export function DatePicker({
className,
placeholder = "날짜 선택",
disabled,
zIndex, // zIndex prop 받기
...props
}: DatePickerProps) {
return (
@@ -39,13 +36,8 @@ export function DatePicker({
)}
</Button>
</PopoverTrigger>
<PopoverContent
className={cn(
"w-auto p-0",
zIndex ? `z-[${zIndex}]` : "" // zIndex가 있으면 적용, 없으면 기본값
)}
>
<Calendar classNames={{ cell: "rounded-md" }} {...props} />
<PopoverContent className="w-auto p-0">
<Calendar initialFocus classNames={{ cell: "rounded-md" }} {...props} />
</PopoverContent>
</Popover>
);