Skip to content

Commit b1e90dd

Browse files
mjangirmartijnrusschen
authored andcommitted
Custom Header example is breaking on month change because the month name is being passed as string instead of month index. (Hacker0x01#1856)
1 parent 02e9f2c commit b1e90dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs-site/src/examples/render_custom_header.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ export default class Default extends React.Component {
9393

9494
<select
9595
value={months[getMonth(date)]}
96-
onChange={({ target: { value } }) => changeMonth(value)}
96+
onChange={({ target: { value } }) =>
97+
changeMonth(months.indexOf(value))
98+
}
9799
>
98100
{months.map(option => (
99101
<option key={option} value={option}>

0 commit comments

Comments
 (0)