Skip to content

Commit

Permalink
fix: (DatePicker) fix the calculation of fallback value
Browse files Browse the repository at this point in the history
  • Loading branch information
awmleer committed Feb 28, 2022
1 parent 577842d commit cc5c4cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/date-picker/date-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const DatePicker: FC<DatePickerProps> = p => {
let date = value
if (date === null) {
date = new Date(
bound(now.getDate(), props.min.getDate(), props.max.getDate())
bound(now.getTime(), props.min.getTime(), props.max.getTime())
)
}
return convertDateToStringArray(date, props.precision)
Expand Down

0 comments on commit cc5c4cd

Please sign in to comment.