Skip to content

Commit

Permalink
Fixes format of return value when Apply button is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
sesolaga committed Mar 29, 2023
1 parent c74416e commit 75419ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import dayjs from "dayjs";
import React, { useCallback, useContext } from "react";

import DatepickerContext from "../contexts/DatepickerContext";
Expand Down Expand Up @@ -32,8 +33,8 @@ const Footer: React.FC = () => {
onClick={() => {
if (period.start && period.end) {
changeDatepickerValue({
startDate: period.start,
endDate: period.end
startDate: dayjs(period.start).format("YYYY-MM-DD"),
endDate: dayjs(period.end).format("YYYY-MM-DD")
});
hideDatepicker();
}
Expand Down

0 comments on commit 75419ce

Please sign in to comment.