Eduard Arevshatyan Eduard Arevshatyan - 4 months ago 52
TypeScript Question

Datepicker with imput tag

I would change this lable tag

<label>{{list.createdat | date: 'dd.MM.yyyy'}}</label>
on input tag, to create a simple datapicker:

<input type="date"/>

But in
tag i have parse data from server, and i dont know how bind
tag with this

How to write a correct syntax? Like this? :

<input type="date"/ {list.createdat | date: 'dd.MM.yyyy'}>

At finally, i would something like this:

enter image description here


<input type="date"> requires a string and doesn't work with a Date instance.

<input type="date" [value]="list.createdat">

Plunker example