Skip to content

Commit 60c0c2a

Browse files
committed
[bug] Format date values with expected format
Date values are expected to be in ISO 8601 format (YYYY-MM-DD) but value returned can be off on single digit days and months
1 parent 43852dc commit 60c0c2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Calendar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ const Calendar: React.FC<Props> = ({
121121
const ipt = input?.current;
122122
changeDatepickerValue(
123123
{
124-
startDate: start,
125-
endDate: end
124+
startDate: dayjs(start).format("YYYY-MM-DD"),
125+
endDate: dayjs(end).format("YYYY-MM-DD")
126126
},
127127
ipt
128128
);

0 commit comments

Comments
 (0)