I'm passing dynamic type to input using angular @Input decorator. It's doesn't working and showing NaN value => type="NaN". How I can acheive this? Here is my code:
datepicker.html
<input class="{{ value ? 'has-value' : '' }}"
type="{{inputType}}"
[(ngModel)]="value"
[max]="getToday()"/>
datepicker.ts
@Input() inputType: string;
app.html
<app-datepicker [inputType]="datetime-local"[(ngModel)]="example1"
(ngModelChange)="filter()"></app-datepicker>
<app-datepicker [inputType]="date"[(ngModel)]="example2"
(ngModelChange)="filter()"></app-datepicker>