事件名 说明 回调参数
change 当值变化时触发的事件 picker: Picker 实例
这个Picker实例拿到的是日期控件每列选中的那个值
以下面实例为例
date2.png
代码
取消
选择预约日期区间
确定
change事件
//改变起始日期
onChangeDate(picker) {
console.log('picker111==',picker)
const formatValue = (picker.getValues()[0] + picker.getValues()[1] + picker.getValues()[2])
const format = (picker.getValues()[0] + picker.getValues()[1] + picker.getValues()[2]).replace(/[\u4e00-\u9fa5]/g, '-')
console.log('1==',picker.getValues())
console.log('formatValue==',formatValue)
console.log('format111==',format)
console.log(form