Skip to content

Commit

Permalink
(#0) afterAllDate 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
baegofda committed Jan 5, 2024
1 parent 8400062 commit 4d0881b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/components/Input/InputDatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const InputDatePicker = ({
required = false,
className,
inputClassName,
afterAllDate,
label,
}: InputDatePickerProps & HTMLAttributes<HTMLInputElement>) => {
const id = useId();
Expand Down Expand Up @@ -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<HTMLInputElement>) => e.target.blur()}
onChange = {() => {}}
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/Input/InputDatePicker/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DatePickerCalendarProps, PeriodDates } from "@/core/components/Calendar/DatePickerCalendar/types/DatePickerCalendarProps";

export interface DatePickerProps extends Pick<DatePickerCalendarProps, "disabled" | "disabledDates" | "cutoffDate" | "cutoffAfterDate" | "initialDate"> {
export interface DatePickerProps extends Pick<DatePickerCalendarProps, "disabled" | "disabledDates" | "cutoffDate" | "cutoffAfterDate" | "initialDate" | "afterAllDate"> {
variants?: DatePickerCalendarProps["variants"];
externalDates?: PeriodDates;
isOpen: boolean;
Expand Down

0 comments on commit 4d0881b

Please sign in to comment.