我在洞庭湖边
我在洞庭湖边
  • 发布:2017-09-01 17:33
  • 更新:2017-09-01 17:33
  • 阅读:1494

Uncaught TypeError: Cannot read property 'picker' of undefined at js/mui.picker.min.js:7

分类:MUI
报错:Uncaught TypeError: Cannot read property 'picker' of undefined at js/mui.picker.min.js:7  

代码:

<span>
<label style="width: 0px;color: red;">*</label>
<label >出生日期:</label>
<button id='Birthday' data-options='{"type":"date","beginYear":1949,"endYear":2016}' class="btn mui-btn mui-btn-block" style="width: 40%;float: left;margin-top: 20px;">选择时间
</button>
</span>

var Birthday;
document.getElementById("Birthday").addEventListener('tap', function() {
var optionsJson = this.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var picker = new $.DtPicker(options);
picker.show(function(rs) {
document.getElementById("Birthday").innerText=rs.text;
Birthday = rs.text.replace(/-/g,'/');//把日期中的 - 改为 /
picker.dispose();
});
}, false);

引入的js/css:

<link rel="stylesheet" href="../css/mui.min.css">
<link rel="stylesheet" type="text/css" href="../css/app.css" />
<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
<link rel="stylesheet" type="text/css" href="../css/mui.picker.css" />
<link href="../css/mui.poppicker.css" rel="stylesheet" />

<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/mui.picker.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/mui.poppicker.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/city.data-3.js" type="text/javascript" charset="utf-8"></script>

2017-09-01 17:33 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复