We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d84d31 commit 801c029Copy full SHA for 801c029
src/calendar.jsx
@@ -691,14 +691,20 @@ export default class Calendar extends React.Component {
691
);
692
};
693
694
+ handleTodayButtonClick = (e) => {
695
+ this.props.onSelect(getStartOfToday(), e);
696
+ this.props.setPreSelection(getStartOfToday());
697
+ };
698
+
699
700
renderTodayButton = () => {
701
if (!this.props.todayButton || this.props.showTimeSelectOnly) {
702
return;
703
}
704
return (
705
<div
706
className="react-datepicker__today-button"
- onClick={(e) => this.props.onSelect(getStartOfToday(), e)}
707
+ onClick={(e) => this.handleTodayButtonClick(e)}
708
>
709
{this.props.todayButton}
710
</div>
0 commit comments