IcChange event not emitted from date picker when date not within allowed range
Summary of the bug
On the date picker component, if you select a date which is not within the allowed range (i.e. when max, min, disablePast or disableFuture has been set), the icChange event is not emitted.
Raised by a customer (split out from #3063) - emitting icChange even when the date is not within the allowed range is needed for them as they want to validate the value themselves and update their custom validation message.
🪜 How to reproduce
- Go to this StackBlitz which shows three date pickers - the first uses
minandmax, the seconddisablePastand the thirddisableFuture. - Type in dates which are outside of the allowed range of dates.
- See that icChange is not emitted (logged to the console). It is only emitted when the date is within the allowed range.
🧐 Expected behaviour
It would be useful if the icChange event gets emitted even when the date is not one which is allowed to accommodate for custom validation handling.
Note: icChange firing when invalid dates are chosen should be a prop that's disabled by default because it's only of benefit to users making external validation.