DatePicker empty state validation

Hi all,

I have a question about the DatePicker component and its validation.
When a date has already been selected and you try to clear it manually, as soon as you tab away from the field the DatePicker is marking the value as invalid.

Is it an intended behavior?

It is basically not possible to clear a date value and leave the DatePicker in a valid empty state.
I guess it should be possible, considering for example an optional date field inside a form.

I would also like to ask why the DatePicker component does not provide an onBlur prop.
For example, it could be useful to detect a blur event when the user is entering dates manually in order to save the value only when he’s tabbed away from the field.

Thank you.

Cheers
Roberto

These are great questions, @remanuel!

I think those are great points to raise in an issue at https://github.com/patternfly/patternfly-react/issues. The DatePicker is still in beta - so calling out oversights or bugs like this is super helpful!

Hi @nicolethoen, I’ve opened an issue following your suggestion.

Thank you.

Roberto