链接到Date对象的时间输入字段

时间:2018-11-22 15:43:13

标签: angular angular6

我正在尝试预填充Time类型的输入字段

<input type="time" class="form-control time" [(ngModel)]="this.newLine.downtime">

downtime的类型为Date。调试时,我看到对象已正确分配Thu Oct 04 2018 00:30:00 GMT+0200 (Midden-Europese zomertijd)。但是将其指定到输入字段将显示

--:--

我知道是否可以将其从javascript端更改为确实显示的字符串,但是我需要从模板端进行更改。

我举个例子: https://stackblitz.com/edit/angular-8s7pqs

0 个答案:

没有答案
相关问题