Closed wnvko closed 5 months ago
Same issue is valid for the calendar!
@wnvko It seems that that is the default behavior of the igcDatePicker. If you delete the value and then check the property it seems to return Mon Jan 01 0001: The IgrDatePicker does the same since it simply wraps the IgcDatePicker.
Perhaps this should be logged here to be fixed in the igc component: https://github.com/IgniteUI/igniteui-webcomponents/issues
That'd be the old date picker then, it's replacement is imminent but not out just yet https://github.com/IgniteUI/igniteui-webcomponents/pull/1086. Not sure if an issue for the old will be prioritized at this point. The other bit that irks me still the comment about the calendar, since this time the WC component accepts it and clears just fine: If that's not the case in React there might still be an issue somewhere.
@damyanpetev @wnvko As far as I can tell the calendar doesn't have an issue with undefined
as a value. It clears correctly and when checking the value it return undefined as expected: https://codesandbox.io/p/sandbox/fervent-borg-7n5fsh
Let me know if I'm missing something.
Description
I have a date picker bound to a variable. I am trying to delete its value by clicking on delete button.
Steps to reproduce
Setup the date picker like this:
Select a date in the picker and then delete it via click on delete button (the x next to the calendar icon).
Result
The value of the picker becomes 01/01/0001.
Expected result
The value should become
undefined
ornull
.