fix: expanded

master
Guillermo Pages 5 months ago
parent ae00ff09e1
commit 87d5661c9a

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

@ -32,11 +32,13 @@ export const DateRange: React.FC<DateRangeProps> = ({
const startDate = startOfDay(from); const startDate = startOfDay(from);
const endDate = startOfDay(to); 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 const days = included
? eachDayOfInterval({ start: startDate, end: endDate }) ? eachDayOfInterval({ start: startDate, end: endDate })
: eachDayOfInterval({ start: startDate, end: endDate }).slice(1, -1); : 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 ? { const dateRange = selected ? {
startDate, startDate,
endDate, endDate,

Loading…
Cancel
Save