首页 > 代码库 > MUI中的picker插件怎么设置初始值
MUI中的picker插件怎么设置初始值
$(‘.input-rent-datetime‘).each(function(i, obj) {
obj.addEventListener(‘tap‘, function() {
var optionsJson = this.getAttribute(‘data-options‘) || ‘{}‘;
var options = JSON.parse(optionsJson);
var picker = new $.DtPicker(options);
if(obj.getAttribute("id")=="orderDateTo"){
var date= new Date(beginTime);;
options.beginYear=date.getFullYear();
options.beginMonth=date.getMonth()+1;
options.beginDay=date.getDate();
options.beginCustomData=http://www.mamicode.com/date.getHours();
}
picker.show(function(rs) {
obj.value = http://www.mamicode.com/rs.text;
picker.dispose();
beginTime = rs.text;
});
}, false);
});
MUI中的picker插件怎么设置初始值