From 09690034116241ca58b5cb31c315c2b82ea1a230 Mon Sep 17 00:00:00 2001 From: Dvir Pollinger Date: Fri, 3 May 2024 22:28:52 +0300 Subject: [PATCH] fix: add null protection for onDatePick callback (#2045) --- packages/core/src/components/DatePicker/DatePicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/components/DatePicker/DatePicker.tsx b/packages/core/src/components/DatePicker/DatePicker.tsx index cf3b1924ef..f069a88428 100644 --- a/packages/core/src/components/DatePicker/DatePicker.tsx +++ b/packages/core/src/components/DatePicker/DatePicker.tsx @@ -116,6 +116,7 @@ const DatePicker: VibeComponent = forwardRef { + if (!onPickDate) return; if (focusedInput === FocusInput.startDate) { onPickDate({ ...date, endDate: null }); } else {