How to feed data in time tag from angular controller

I am using time field in html and want to pass data from angular controller

<input type="time"  ng-model="bt_time" class="form-control" style="width: 20%" required>

      

I want to transfer data from controller

$scope.bt_time='12:30';

      

But I am getting the error

Error: [ngModel: datefmt] http://errors.angularjs.org/1.6.5/ngModel/datefmt?p0=12%3A30

+3


source to share


1 answer


Check out this below code:



$scope.bt_time =  new Date(2017, 0, 1, 12, 30, 0);

      

0


source







All Articles