调用平台原生年月日时间选择控件
牛刀小试
获取时间
获取日期
获取年月(android格式化)
获取时间
获取日期
获取年月(ios格式化)
示例代码
//选择时间
app.dateTimePicker.selectTime(function(result){
$("#result_datepicker").html(JSON.stringify(result));
});
//选择日期
app.dateTimePicker.selectDate(function(result){
$("#result_datepicker").html(JSON.stringify(result));
});
//滚轮选择时间
app.dateTimePicker.wheelSelectTime(function(result){
$("#result_datepicker").html(JSON.stringify(result));
});
//滚轮选择日期
app.dateTimePicker.wheelSelectDate(function(result){
$("#result_datepicker").html(JSON.stringify(result));
});
//滚轮选择年月(ios)
app.dateTimePicker.wheelSelectDate(function(result){
$("#result_datepicker").html(JSON.stringify(result));
},null,"yyyy-MM",null,true);