Skip to content

Commit f12f420

Browse files
committed
fix(months): monthClassName is passed the month instead of the current day
1 parent 1d84d31 commit f12f420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/month.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export default class Month extends React.Component {
288288
preSelection,
289289
monthClassName,
290290
} = this.props;
291-
const _monthClassName = monthClassName ? monthClassName(day) : undefined;
291+
const _monthClassName = monthClassName ? monthClassName(utils.setMonth(day, m)) : undefined;
292292
return classnames(
293293
"react-datepicker__month-text",
294294
`react-datepicker__month-${m}`,

0 commit comments

Comments
 (0)