From d5ef496bb66f953fcdf62c7db736512403bcf6d3 Mon Sep 17 00:00:00 2001 From: Luyiin <76715937+ZiYi0414@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:49:08 +0800 Subject: [PATCH] demo(date-picker-demo): fix select-in-range demo (#41161) --- components/date-picker/demo/select-in-range.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/date-picker/demo/select-in-range.tsx b/components/date-picker/demo/select-in-range.tsx index 8c200aa25b..156ddf6b52 100644 --- a/components/date-picker/demo/select-in-range.tsx +++ b/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; };