Browse Source

demo(date-picker-demo): fix select-in-range demo (#41161)

pull/41344/head
Luyiin 2 years ago
committed by GitHub
parent
commit
d5ef496bb6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/date-picker/demo/select-in-range.tsx

4
components/date-picker/demo/select-in-range.tsx

@ -14,8 +14,8 @@ const App: React.FC = () => {
if (!dates) {
return false;
}
const tooLate = dates[0] && current.diff(dates[0], 'days') > 7;
const tooEarly = dates[1] && dates[1].diff(current, 'days') > 7;
const tooLate = dates[0] && current.diff(dates[0], 'days') >= 7;
const tooEarly = dates[1] && dates[1].diff(current, 'days') >= 7;
return !!tooEarly || !!tooLate;
};

Loading…
Cancel
Save