Skip to content

Commit 4432330

Browse files
committed
Fixed bug where the displayFormat was affecting the period being selected
1 parent cc18f59 commit 4432330

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Datepicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ const Datepicker: React.FC<Props> = ({
215215
validDate && (startDate.isSame(endDate) || startDate.isBefore(endDate));
216216
if (condition) {
217217
setPeriod({
218-
start: formatDate(startDate, displayFormat),
219-
end: formatDate(endDate, displayFormat)
218+
start: formatDate(startDate),
219+
end: formatDate(endDate)
220220
});
221221
setInputText(
222222
`${formatDate(startDate, displayFormat)}${

0 commit comments

Comments
 (0)