You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use date from `selected` prop when manipulating only time for input value
643
+
if(
644
+
this.props.showTimeSelectOnly&&
645
+
this.props.selected&&
646
+
date&&
647
+
!isSameDay(date,this.props.selected)
648
+
){
649
+
date=set(this.props.selected,{
650
+
hours: getHours(date),
651
+
minutes: getMinutes(date),
652
+
seconds: getSeconds(date),
653
+
});
654
+
}
655
+
656
+
// Update selection if either (1) date was successfully parsed, or (2) input field is empty
657
+
if(date||!value){
658
+
this.setSelected(date,event,true);
659
+
}
618
660
}
619
661
};
620
662
@@ -654,6 +696,7 @@ export default class DatePicker extends Component<
654
696
}
655
697
};
656
698
699
+
// setSelected is called either from handleChange (user typed date into textbox and it was parsed) or handleSelect (user selected date from calendar using mouse or keyboard)
0 commit comments