|
|
|
|
@ -32,11 +32,13 @@ export const DateRange: React.FC<DateRangeProps> = ({
|
|
|
|
|
const startDate = startOfDay(from);
|
|
|
|
|
const endDate = startOfDay(to);
|
|
|
|
|
|
|
|
|
|
// If included is false, we exclude the start and end dates
|
|
|
|
|
// If included is false, we exclude the start and end dates from display
|
|
|
|
|
const days = included
|
|
|
|
|
? eachDayOfInterval({ start: startDate, end: endDate })
|
|
|
|
|
: eachDayOfInterval({ start: startDate, end: endDate }).slice(1, -1);
|
|
|
|
|
|
|
|
|
|
// The selection range always uses the original start/end dates
|
|
|
|
|
// This ensures proper visual continuity when included=false
|
|
|
|
|
const dateRange = selected ? {
|
|
|
|
|
startDate,
|
|
|
|
|
endDate,
|
|
|
|
|
|