Skip to content

Commit e02bb63

Browse files
authored
Merge pull request #102 from sesolaga/fix/format-returned-value-on-apply-click
Fixes format of return value when Apply button is clicked
2 parents c74416e + 75419ce commit e02bb63

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Footer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import dayjs from "dayjs";
12
import React, { useCallback, useContext } from "react";
23

34
import DatepickerContext from "../contexts/DatepickerContext";
@@ -32,8 +33,8 @@ const Footer: React.FC = () => {
3233
onClick={() => {
3334
if (period.start && period.end) {
3435
changeDatepickerValue({
35-
startDate: period.start,
36-
endDate: period.end
36+
startDate: dayjs(period.start).format("YYYY-MM-DD"),
37+
endDate: dayjs(period.end).format("YYYY-MM-DD")
3738
});
3839
hideDatepicker();
3940
}

0 commit comments

Comments
 (0)