diff --git a/frontend/src/components/BookingView/FilteringDrawer.tsx b/frontend/src/components/BookingView/FilteringDrawer.tsx index f7b6467..0826328 100644 --- a/frontend/src/components/BookingView/FilteringDrawer.tsx +++ b/frontend/src/components/BookingView/FilteringDrawer.tsx @@ -111,11 +111,11 @@ const FilteringDrawer = (props: Props) => { const handleCustomDuration = ( event: React.ChangeEvent ) => { - const value = event.target.value; - - if (!isNaN(parseInt(value)) && typeof value === 'string') { - setDuration(parseInt(value)); - onChange(parseInt(value)); + let value = parseInt(event.target.value); + if (!isNaN(value)) { + value = Math.max(0, value); + setDuration(value); + onChange(value); } else { setDuration(NaN); }