Skip to content

Commit

Permalink
fix: close #608 (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
3lang3 committed Jan 5, 2023
1 parent 5f1c0d9 commit a5820f8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const DatePicker = forwardRef<DateTimePickerInstance, DatePickerProps>(

const pickerValue = useMemo(() => {
const value = props.popup
? formatValue(props.value)
? formatValue(currentDateRef.current)
: currentDateRef.current
const values = originColumns.map(column => {
switch (column.type) {
Expand Down Expand Up @@ -264,7 +264,7 @@ const DatePicker = forwardRef<DateTimePickerInstance, DatePickerProps>(
onCancel={props.onCancel}
>
{(_, selectRows, actions) =>
props.children?.(value, selectRows, actions)
props.children?.(value || defaultValue, selectRows, actions)
}
</Picker>
)
Expand Down

0 comments on commit a5820f8

Please sign in to comment.