-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
To duplicate:
- set SimpleDateChoose with a date
- just change the month/year
- EXPECTED: only the month/year is changed
- ACTUAL: the day of month is changed to "1"
This line always sets the days[0] instead of preferring existing day value, and only setting day[0] if no day was previously set.
https://github.com/harvard-edtech/dce-reactkit/blob/main/src/components/SimpleDateChooser.tsx#L154
This line only sets the day, and doesn't forced change the month/year like the day is being changed above.
dce-reactkit/src/components/SimpleDateChooser.tsx
Lines 213 to 221 in c2bd4c7
| onChange={(e) => { | |
| // Only change the day | |
| onChange( | |
| month, | |
| Number.parseInt(e.target.value, 10), | |
| year, | |
| ); | |
| }} | |
| > |
Metadata
Metadata
Assignees
Labels
No labels