cordova-plugin-datepicker ios模拟器几次就崩溃
2017-10-17 09:57
806 查看
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); });
官网例子是这个,在IOS上模拟几次就挂掉了。解决方法是在每次调用时都重新set一个date近options中
options.date = new Date();
options只实例化1次的情况是有这样的Bug.
相关文章推荐
- DatePicker iOS Plugin for using PhoneGap / Cordova 3.0
- cordova-plugin-datepicker 添加只选择年月的模式(android)
- ios DatePicker 自定义,参考他人代码,整理...优化, 循环滑动scrollview
- IOS开发-UIDatePicker和UIPickerView(拾取器)
- IOS成长之路-UIDatePicker 控件
- IOS开发之DatePicker控件详解
- iOS开发-DatePicker控件
- 关于 $cordovaDatePicker 默认时间控件样式的问题
- iOS - 模拟器播放视频的时候出现异常崩溃
- ios-UIDatePicker
- IOS笔记 this class is not key value coding-compliant for the key datePicker
- ionic 、 cordova ios 模拟器无法运行 处理过程
- ReactNativeiOS(三)开发零碎2 DatePickerIOS propType warning 4个
- iOS 解决时间拾取器 datePicker 时区问题
- iOS界面编程-UIDatePicker
- ionic开发——cordova-plugin-image-picker 在安卓中闪退的解决办法
- iOS--UIDatePicker 时间选择器 的使用方法详细
- iOS datepicker 和 pickerView 设置字体颜色
- ios 字符串转date,模拟器ok,真机不ok,
- IOS_DatePicker_PickerView_SegmentControl_键盘处理