Skip to content

Commit

Permalink
fix: fix date picker header button submit issue (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: dev-redo <[email protected]>
  • Loading branch information
dev-redo and dev-redo authored Apr 30, 2024
1 parent 26a5c3b commit d873058
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/DatePicker/DateTime/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export function DateTime({
// https://reactdatepicker.com/#example-custom-header
}) => (
<HeaderWrapper>
<HeaderButton onClick={decreaseMonth}>
<HeaderButton type="button" onClick={decreaseMonth}>
<Icon.ChevronLeftSmall color={color['main-black']} />
</HeaderButton>
<HeaderText>
<span>{MONTHS[date.getMonth()]}</span>
<span> {date.getFullYear()}</span>
</HeaderText>
<HeaderButton onClick={increaseMonth}>
<HeaderButton type="button" onClick={increaseMonth}>
<Icon.ChevronRightSmall color={color['main-black']} />
</HeaderButton>
</HeaderWrapper>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DatePicker/SingleDate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ export function SingleDate({
// https://reactdatepicker.com/#example-custom-header
}) => (
<HeaderWrapper>
<HeaderButton onClick={decreaseMonth}>
<HeaderButton type="button" onClick={decreaseMonth}>
<Icon.ChevronLeftSmall color={color['main-black']} />
</HeaderButton>
<HeaderText>
<span>{MONTHS[date.getMonth()]}</span>
<span> {date.getFullYear()}</span>
</HeaderText>
<HeaderButton onClick={increaseMonth}>
<HeaderButton type="button" onClick={increaseMonth}>
<Icon.ChevronRightSmall color={color['main-black']} />
</HeaderButton>
</HeaderWrapper>
Expand Down

0 comments on commit d873058

Please sign in to comment.