Skip to content

Commit

Permalink
fix: allow empty strings to run onBlur
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-yahia committed Aug 13, 2024
1 parent 1ac9aff commit 22483c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class D2Date extends React.Component<Props, State> {
handleDateSelected(value: {calendarDateString: string}) {
const selectedDate = value?.calendarDateString;
this.setState({ date: selectedDate });
if (selectedDate) {
if (selectedDate !== undefined) {
this.props.onBlur(selectedDate);
}
this.props.onDateSelectedFromCalendar && this.props.onDateSelectedFromCalendar();
Expand Down

0 comments on commit 22483c9

Please sign in to comment.