点击组件picker没有弹出选择器
< picker style = 'width:100%;border-right:gray solid 2rpx' mode = "date" start = "{{currentdate}}" value = "{{date}}" data-id = '1' bindchange = "bindDateChange" > < view class = "go-center" > {{date1}} </ view > </ picker > |
//日期选择器 bindDateChange: function (e) { console.log(e.currentTarget.dataset.id) if (e.currentTarget.dataset.id == 1) { this .setData({ date1: e.detail.value }) app.globalData.date1 = e.detail.value } else if (e.currentTarget.dataset.id == 2) { this .setData({ date2: e.detail.value }) app.globalData.date2 = e.detail.value } }, |
点击picker ,没有出现时间选择器。
2 回复