dcloudio / uni-ui

基于uni-app的、全端兼容的、高性能UI框架
https://uniapp.dcloud.io/component/uniui/uni-ui.html
Apache License 2.0
1.87k stars 667 forks source link

uni-datetime-picker 日期选择器范围选择问题 #684

Closed lotherli closed 1 year ago

lotherli commented 1 year ago

当type='daterange', 选择一个日期区间后(如 ["2023-02-01", "2023-02-02"]),进行二次选择时,只选择一个日期(“2023-02-03”)后直接点击确认,返回的还是上次选择的值(["2023-02-01", "2023-02-02"])。

修复位置为 : uni-datetime-picker.vue ,mobileChange函数增加下列内容 if (!(before && after)) return

zhenyuWang commented 1 year ago

你的问题是只选择了一个日期的时候不应该触发change事件是吧?

lotherli commented 1 year ago

是的,既然是日期范围选择,只选择单个日期时,应不触发onchange事件

-- 发自我的网易邮箱手机智能版

在 2023-02-06 17:28:14,"running snail" @.***> 写道:

你的问题是只选择了一个日期的时候不应该触发change事件是吧?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

zhenyuWang commented 1 year ago

2.2.18 已修复