diff --git a/src/static-past-time-picker/QuickPicker.tsx b/src/static-past-time-picker/QuickPicker.tsx index 6d4f25dabe..ed31a1f569 100644 --- a/src/static-past-time-picker/QuickPicker.tsx +++ b/src/static-past-time-picker/QuickPicker.tsx @@ -11,6 +11,7 @@ function QuickPicker({ options: optionsParams, optionsFilter, onSelect, + onCancel, timeRange, experimental, NotAvailableToday, @@ -49,7 +50,8 @@ function QuickPicker({ }; const handleCancel = () => { - onSelect(timeRange as string); + // onSelect(timeRange as string); + onCancel?.(); }; useEffect(() => { @@ -89,7 +91,7 @@ function QuickPicker({ - diff --git a/src/static-past-time-picker/interfaces.ts b/src/static-past-time-picker/interfaces.ts index e499d8df06..eeb767b305 100644 --- a/src/static-past-time-picker/interfaces.ts +++ b/src/static-past-time-picker/interfaces.ts @@ -87,6 +87,7 @@ export interface QuickPickerProps extends PickerProps { */ optionsFilter?: (o: Option) => boolean; NotAvailableToday: boolean; + onCancel?: () => void; } export interface InnerRangePanelProps {