fix: expanded

master
Guillermo Pages 5 months ago
parent ae00ff09e1
commit 87d5661c9a

@ -3,10 +3,10 @@
.DateRange {
&__Container {
display: flex;
flex-wrap: wrap;
display: grid;
width: 100%;
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
gap: 0;
align-items: flex-start;
}
&__DayWrapper {

@ -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,

Loading…
Cancel
Save