Skip to content

Commit

Permalink
fix(datepicker): 当没有传递value / defaultValue时渲染0的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-CW-Code committed Dec 25, 2023
1 parent f6675e0 commit 5a8e74d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/packages/datepicker/datepicker.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent<
}

useEffect(() => {
if (selectedDate) {
setPickerOptions(columns())
}
setPickerOptions(columns())
}, [selectedDate, startDate, endDate])

return (
Expand Down
4 changes: 1 addition & 3 deletions src/packages/datepicker/datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent<
}

useEffect(() => {
if (selectedDate) {
setPickerOptions(columns())
}
setPickerOptions(columns())
}, [selectedDate, startDate, endDate])

return (
Expand Down

0 comments on commit 5a8e74d

Please sign in to comment.