Initialise bs-timepicker with utc
I'm using the following code to create a timepicker (source: http://mgcrea.github.io/angular-strap/#/datepicker#timepickers). But I can't initialize the time. It keeps initializing local time while I want another. What am I doing wrong?
<input id="txtContrStartTimeTime" name="txtStartTimeTime" type="text" class="form-control" ng-model="time" bs-timepicker data-show-meridian="false" data-minute-step="1" >
$scope.time = new Date(546541685565); //somewhere in 1989 console.log("time first", $scope.time);
I had to disable a default time being set and change $scope.time to "hh:mm" format.
$scope.time = new Date(new Date(546541685565).setMinutes(0));
As done in the plunkr of the widget: http://plnkr.co/edit/?p=preview
EDIT: Actually it should work without setMiutes(0). Are you sure, you're setting the right model?