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
* main:
test: cover early return cases
feat: support parsing of date range strings
chore(deps-dev): bump stylelint from 16.7.0 to 16.9.0
test: parse date range
chore(deps-dev): bump @types/node from 22.5.0 to 22.5.1
chore(deps-dev): bump lint-staged from 15.2.7 to 15.2.9
chore(deps-dev): bump eslint-plugin-unused-imports from 3.2.0 to 4.1.3
// 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