Skip to content

Commit

Permalink
fix(datetime-picker): datetime-picker 没有值时,弹出层默认选中当前日期/时间。 (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeyLin committed Sep 4, 2023
1 parent 8375695 commit 309fb2a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const DatePicker = forwardRef<DateTimePickerInstance, DatePickerProps>(

const formatValue = date => {
if (!isDate(date)) {
date = minDate
date = new Date()
}

date = Math.max(date, minDate.getTime())
Expand Down

0 comments on commit 309fb2a

Please sign in to comment.