Skip to content

Commit 46298c9

Browse files
committed
Use DATE_FORMAT const
1 parent 77fb990 commit 46298c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Calendar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dayjs from "dayjs";
22
import React, { useCallback, useContext, useEffect, useMemo, useState } from "react";
33

4-
import { CALENDAR_SIZE } from "../../constants";
4+
import { CALENDAR_SIZE, DATE_FORMAT } from "../../constants";
55
import DatepickerContext from "../../contexts/DatepickerContext";
66
import {
77
formatDate,
@@ -124,8 +124,8 @@ const Calendar: React.FC<Props> = ({
124124
const ipt = input?.current;
125125
changeDatepickerValue(
126126
{
127-
startDate: dayjs(start).format("YYYY-MM-DD"),
128-
endDate: dayjs(end).format("YYYY-MM-DD")
127+
startDate: dayjs(start).format(DATE_FORMAT),
128+
endDate: dayjs(end).format(DATE_FORMAT)
129129
},
130130
ipt
131131
);

0 commit comments

Comments
 (0)