Skip to content

Commit

Permalink
fix: 优化 datepicker 输入事件交互
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin committed Sep 26, 2022
1 parent 14d6255 commit bfb6e2b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ export default defineComponent({
year.value = parseToDayjs(value.value, formatRef.value.format).year();
month.value = parseToDayjs(value.value, formatRef.value.format).month();
time.value = formatTime(value.value, formatRef.value.timeFormat);
if (value.value) {
cacheValue.value = formatDate(value.value, {
format: formatRef.value.format,
});
}
} else {
isHoverCell.value = false;
cacheValue.value = formatDate(value.value, {
format: formatRef.value.format,
});
inputValue.value = formatDate(value.value, {
format: formatRef.value.format,
});
Expand Down

0 comments on commit bfb6e2b

Please sign in to comment.