标签:mui his .sh isp text event add func option
$(‘.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=date.getHours();
}
picker.show(function(rs) {
obj.value = rs.text;
picker.dispose();
beginTime = rs.text;
});
}, false);
});
标签:mui his .sh isp text event add func option
原文地址:http://www.cnblogs.com/Adyblog/p/7126541.html