Z
Z
zlodiak2019-08-10 14:22:04
Angular
zlodiak, 2019-08-10 14:22:04

How to bind with timepicker model?

Please help me to connect the timepicker with the model. As a timepicker, I use the usual one . The component has the following model: I would like the timepicker to have a preset time (08:00) after loading the page. And so that after the user changes this time, the model would change accordingly (not necessarily instantly, it will also suit by pressing the submit button). It is permissible to break the model into 2 parts (hours, minutes). Here is my attempt
<input matInput type="time">
public timeFrom: string = '08:00';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-08-10
@zlodiak

[(ngModel)]="timeFrom"
??

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question