Merge branch 'payout'

This commit is contained in:
focp212@naver.com
2025-09-22 14:57:03 +09:00
7 changed files with 128 additions and 25 deletions

View File

@@ -9,8 +9,9 @@ import { CalendarType } from '@/entities/common/model/types';
interface NiceCalendarProps {
calendarOpen: boolean;
setCalendarOpen: (calendarOpen: boolean) => void;
startDate: string;
endDate: string;
startDate?: string;
endDate?: string;
singleDate?: string;
calendarType: CalendarType;
setNewDate: (date: string) => void;
};
@@ -20,6 +21,7 @@ const NiceCalendar = ({
setCalendarOpen,
startDate,
endDate,
singleDate,
calendarType,
setNewDate
}: NiceCalendarProps) => {
@@ -37,14 +39,21 @@ const NiceCalendar = ({
const setMinMaxValueDate = () => {
if(calendarType === CalendarType.Start){
setMinDate(undefined);
setMaxDate(new Date(endDate));
if(!!endDate){
setMaxDate(new Date(endDate));
}
setValueDate(startDate);
}
else if(calendarType === CalendarType.End){
setMinDate(new Date(startDate));
if(!!startDate){
setMinDate(new Date(startDate));
}
setMaxDate(new Date());
setValueDate(endDate);
}
else if(calendarType === CalendarType.Single){
setValueDate(singleDate);
}
};
const formatMonthYear = (locale: string | undefined, date: Date) => {