Skip to content

Commit 607f1ce

Browse files
dbchristopherLuke Bowerman
andauthored
InputDate: Render correct month for value prop (#1013)
* set view month to value prop * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Luke Bowerman <[email protected]> Co-authored-by: Luke Bowerman <[email protected]>
1 parent c8b0633 commit 607f1ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
##[0.8.1]
9+
10+
## Fixed
11+
12+
- Fix issue where InputDate did not render the correct month when setting a value prop
13+
814
## [0.8.0]
915

1016
### NOTABLE

packages/components/src/Form/Inputs/InputDate/InputDate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const InputDate: FC<InputDateProps> = forwardRef(
9595
selectedDate ? formatDateString(selectedDate, locale) : ''
9696
)
9797
const [viewMonth, setViewMonth] = useState<Date | undefined>(
98-
defaultValue || new Date(Date.now())
98+
value || defaultValue || new Date(Date.now())
9999
)
100100

101101
const handleDateChange = (date?: Date) => {

0 commit comments

Comments
 (0)