【发布时间】:2015-09-01 15:28:49
【问题描述】:
我正在使用 ionic 框架开发网络应用程序。在这个应用程序中,我需要一个日期时间选择器,所以我安装了 ng-cordova datepicker 插件,在 android 设备上效果很好,但在 ios 设备上我只得到没有时间的日期,这是我的代码:
var options_date = {
date: new Date(),
mode: 'datetime', // or 'time'
minDate: new Date() - 10000,
allowOldDates: true,
allowFutureDates: true,
doneButtonLabel: 'DONE',
doneButtonColor: '#F2F3F4',
cancelButtonLabel: 'CANCEL',
cancelButtonColor: '#000000'
};
$scope.setDate = function() {
$cordovaDatePicker.show(options_date).then(function(date){
$scope.startDateTime = date;
});
};
感谢您的帮助
【问题讨论】:
标签: angularjs cordova ionic-framework ionic ngcordova