我已經使用時間選擇接受預訂預訂後我已經存儲在database.in編輯預訂我已經通過了時間,時間輸入欄,但我得到的錯誤角度時間選擇器沒有得到錯誤?
Error: [ngModel:datefmt] Expected `01:00:00 pm` to be a date
http://errors.angularjs.org/1.3.13/ngModel/datefmt?p0=01%3A00%3A00%20pm
at REGEX_STRING_REGEXP (angular.js:63)
at Array.<anonymous> (angular.js:19807)
at Object.ngModelWatch (angular.js:23289)
at Scope.promises.$get.Scope.$digest (angular.js:14235)
at Scope.promises.$get.Scope.$apply (angular.js:14506)
at done (angular.js:9659)
at completeRequest (angular.js:9849)
at XMLHttpRequest.requestLoaded (angular.js:9790).i have enclosed my code
.controller('EditCtrl', [
'$scope', '$http', '$location', '$window', '$filter', '$ionicPopup', '$ionicLoading', '$timeout',
function($scope, $http, $location, $window, $filter, $ionicPopup, $ionicLoading, $timeout) {
$http.get('**').success(function(data, dealers, response) {
// $scope.booktime = data.Scheduled_Time;
//console.log($scope.booktime);
$scope.booktime="01:00:00 pm";
})
}
]);
<div ng-controller="EditCtrl">
<div class="col">
<label class="item item-input item-stacked-label">
<span class="input-label" >Time</span>
<input type="time" ng-model="booktime" name="booktime" min="09:00:00" max="21:00:00"required="">
</label>
<div class="form-error" ng-messages="projectForm.booktime.$error">
<div class="form-error" ng-message="required">* Mandatory</div>
<div class="form-error" ng-message="max">Booking times: 9am - 9 pm</div>
</div>
</div>
</div>
將其轉換爲日期對象,其不是日期 –
該怎麼辦? –