1
我已经设法找到几个离子日历模块,但找不到任何日历控件模块,其中用户可以从可用日期中进行选择。那里有什么吗?日历控制离子?
我已经设法找到几个离子日历模块,但找不到任何日历控件模块,其中用户可以从可用日期中进行选择。那里有什么吗?日历控制离子?
http://www.clearlyinnovative.com/ionic-framework-custom-formly-template-using-datepicker-plugin
我已经在这里成功使用的$cordovaDatePicker
插件,这个博客帖子有一个完整的工作项目,formly整合它。
这里是插件 - http://ngcordova.com/docs/plugins/datePicker/
module.controller('MyCtrl', function($scope, $cordovaDatePicker) {
var options = {
date: new Date(),
mode: 'date', // or 'time'
minDate: new Date() - 10000,
allowOldDates: true,
allowFutureDates: false,
doneButtonLabel: 'DONE',
doneButtonColor: '#F2F3F4',
cancelButtonLabel: 'CANCEL',
cancelButtonColor: '#000000'
};
document.addEventListener("deviceready", function() {
$cordovaDatePicker.show(options).then(function(date){
alert(date);
});
}, false);
});