document.getElementById('demo3').onclick = function(){ var now=new Date(); var dtpicker = new mui.DtPicker({ type: "datetime",//设置日历初始视图模式 beginYear:now.getFullYear(), beginMonth:now.getMonth()+1, beginDay:now.getDate(), beginHours:now.getHours()+2, endYear:now.getFullYear(), endMonth:now.getMonth()+1, endDay:now.getDate(), endHours:18, labels: ['年', '月', '日', '时', '分'],//设置默认标签区域提示语 customData: { i: [ { value: "10", text: "10" }, { value: "20", text: "20" }, { value: "30", text: "30" }, { value: "40", text: "40" }, { value: "50", text: "50" }, ] } }) dtpicker.show(function(e) { console.log(e); $("#demo3").text(e.value); }) }