diff --git a/src/core/components/Input/InputDatePicker/index.tsx b/src/core/components/Input/InputDatePicker/index.tsx index 6c46f18..0ba609f 100644 --- a/src/core/components/Input/InputDatePicker/index.tsx +++ b/src/core/components/Input/InputDatePicker/index.tsx @@ -22,6 +22,7 @@ const InputDatePicker = ({ required = false, className, inputClassName, + afterAllDate, label, }: InputDatePickerProps & HTMLAttributes) => { const id = useId(); @@ -80,7 +81,7 @@ const InputDatePicker = ({ type = "text" placeholder = "날짜를 입력해주세요" className = {clsx("flex-1 focus-visible:outline-0 cursor-pointer pointer-events-none", inputClassName)} - value = {periodDates.startDate && `${startDate}${periodDates.endDate && ` - ${endDate}`}`} + value = {periodDates.startDate && (!afterAllDate ? `${startDate}${periodDates.endDate && ` - ${endDate}`}` : `${startDate} ~`)} onKeyDown = {() => false} onFocus = {(e: React.FocusEvent) => e.target.blur()} onChange = {() => {}} diff --git a/src/core/components/Input/InputDatePicker/types/index.ts b/src/core/components/Input/InputDatePicker/types/index.ts index 47ad299..bcc53b1 100644 --- a/src/core/components/Input/InputDatePicker/types/index.ts +++ b/src/core/components/Input/InputDatePicker/types/index.ts @@ -1,6 +1,6 @@ import { DatePickerCalendarProps, PeriodDates } from "@/core/components/Calendar/DatePickerCalendar/types/DatePickerCalendarProps"; -export interface DatePickerProps extends Pick { +export interface DatePickerProps extends Pick { variants?: DatePickerCalendarProps["variants"]; externalDates?: PeriodDates; isOpen: boolean;