Scheduling infrastructure for absolutely everyone.
fix: make strict bottom position of DateRangePicker optional (#19768)
Vijay0e4309777ba0
diff --git a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsxindex b814f367921..7438ae0074c 100644--- a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx+++ b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx@@ -296,6 +296,7 @@ export const CreateOrEditOutOfOfficeEntryModal = ({onDatesChange={(values) => {onChange(values);}}+ strictlyBottom={true}/>)}/>diff --git a/packages/ui/components/form/date-range-picker/DateRangePicker.tsx b/packages/ui/components/form/date-range-picker/DateRangePicker.tsxindex a8d371de527..721c8587e9b 100644--- a/packages/ui/components/form/date-range-picker/DateRangePicker.tsx+++ b/packages/ui/components/form/date-range-picker/DateRangePicker.tsx@@ -17,6 +17,7 @@ type DatePickerWithRangeProps = {maxDate?: Date;withoutPopover?: boolean;"data-testid"?: string;+ strictlyBottom?: boolean;};export function DatePickerWithRange({@@ -28,6 +29,7 @@ export function DatePickerWithRange({disabled,withoutPopover,"data-testid": testId,+ strictlyBottom,}: React.HTMLAttributes<HTMLDivElement> & DatePickerWithRangeProps) {function handleDayClick(date: Date) {if (dates?.endDate) {@@ -86,8 +88,8 @@ export function DatePickerWithRange({className="bg-default text-emphasis z-50 w-auto rounded-md border p-0 outline-none"align="start"sideOffset={4}- side="bottom"- avoidCollisions={false}>+ side={strictlyBottom ? "bottom" : undefined}+ avoidCollisions={!strictlyBottom}>{calendar}</Popover.Content></Popover.Root>