It is possible to bind a component property of Date type to a HTML5 input with type set to datetime-local?
In my component I have a poperty:
<
Inspired by @ne1410s answer I ended doing something very similar but without losing the date type.
I used a pipe to declare the ngModel and call a method dateChanged just to return the conversion of the new Date in the ts.
html code:
ts code:
dateChanged(eventDate: string): Date | null {
return !!eventDate ? new Date(eventDate) : null;
}