我安裝ngCordova日期選擇器,我找不到爲什麼日期選擇器的心不是工作:角ngCordova日期選擇犯規顯示
1)我的看法,我整合了NG-點擊=「日期選擇器()」:
<a ng-click="datepicker()" class="item item-icon-left item-icon-right" href="#">
<img id= "icon_calendar" src="../img/icon_calendrier.svg"/>
<p class="time_date"> </p>
<img class= "flechedate" src="../img/fleche_bleuclaire.svg"/>
</a>
2)我的控制器(以下在ngCordova網站DOC):
angular.module('foot',[]).controller('FootController', function ($scope, $cordovaDatePicker) {
$scope.foot;
$scope.datepicker = function(){
var options = {
date: new Date(),
mode: 'date', // or 'time'
minDate: new Date() - 10000,
allowOldDates: false,
allowFutureDates: true,
doneButtonLabel: 'DONE',
doneButtonColor: '#F2F3F4',
cancelButtonLabel: 'CANCEL',
cancelButtonColor: '#000000'
};
document.addEventListener("deviceready", function() {
$cordovaDatePicker.show(options).then(function(date){
alert(date);
});
}, false);
};
});
仍然無法正常工作 –