0

Ok so I have coming from my object in the following format, "1970-01-01T23:00:00.000Z" and I have a function to a convert it to a normal time in the format of hh:mm. However, I do not know how to format the date while it is two way binded in the following format.

<input type="time" ng-model="times.monday.start" >

The function I made to format the data is the following:

$scope.formatTime = function(dateTime) {
        var time = moment(dateTime).format("hh:mm");
        return time;
    }
CLR45
  • 185
  • 1
  • 16

0 Answers0