0
如何从物化日期选择器中获取选定日期?角度和物化日期选择器
这是我输入:
<div class="input-field col s3">
<input id="buyDate" class="datepicker" type="text" name="buyDate"
ng-model="buyDate" materialize-date-picker readonly>
</div>
而且我的脚本:
$scope.SaveButton = function(){
var postRequest = $http({
method: "POST",
url: "http://localhost:5000/licenses",
dataType: 'json',
data : {
name: $scope.name,
count: $scope.count,
buyDate: $scope.buyDate,
licenseType: $scope.licenseType.licenseTypeId
},
headers: { "Content-Type": "application/json"}
});
postRequest.error(function (data, status){
$window.aler(data.Message);
})
}
它是AngularJS还是Angular 2+? – Sergey
这是AngularJS。 – Kerni
阅读此https://www.w3schools.com/angular/angular_databinding.asp – Sergey