Skip to content

Commit

Permalink
fix(DatePicker): fix preset invalid when needConfirm is false (#4792)
Browse files Browse the repository at this point in the history
* fix: 🐛 增加标识识别preset引起的浮层关闭场景

* refactor: 🔨 优化 preset 场景的实现

* fix: 🐛 移除错误的代码
  • Loading branch information
Cat1007 authored Dec 6, 2024
1 parent f562243 commit 1cf3431
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ export default defineComponent({
trigger: 'preset',
},
);

// 更新到 input,避免 needConfirm 导致值被覆盖
inputValue.value = formatDate(presetVal, {
format: formatRef.value.format,
});
popupVisible.value = false;
}

Expand Down

0 comments on commit 1cf3431

Please sign in to comment.