diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 40bb48330e..90ea4af37a 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -24,7 +24,7 @@ import { getRecurringFreq } from "@calcom/lib/recurringStrings"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; import { detectBrowserTimeFormat, setIs24hClockInLocalStorage, TimeFormat } from "@calcom/lib/timeFormat"; import { trpc } from "@calcom/trpc"; -import { HeadSeo, useCalcomTheme } from "@calcom/ui"; +import { HeadSeo, NumberInput, useCalcomTheme } from "@calcom/ui"; import { CreditCard, User, RefreshCcw } from "@calcom/ui/components/icon"; import { timeZone as localStorageTimeZone } from "@lib/clock"; @@ -226,16 +226,18 @@ const AvailabilityPage = ({ profile, eventType, ...restProps }: Props) => {

{getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })}

- { setRecurringEventCount(parseInt(event?.target.value)); }} /> +

{t("occurrence", { count: recurringEventCount, diff --git a/packages/ui/components/form/index.ts b/packages/ui/components/form/index.ts index 29c00ea19e..cab81972dc 100644 --- a/packages/ui/components/form/index.ts +++ b/packages/ui/components/form/index.ts @@ -15,6 +15,7 @@ export { TextAreaField, TextField, InputFieldWithSelect, + NumberInput, } from "./inputs/Input"; export { Label } from "./inputs/Label"; export { Select, SelectField, SelectWithValidation, getReactSelectProps } from "./select"; diff --git a/packages/ui/components/form/inputs/Input.tsx b/packages/ui/components/form/inputs/Input.tsx index dbdd3dc80f..195a0c7a04 100644 --- a/packages/ui/components/form/inputs/Input.tsx +++ b/packages/ui/components/form/inputs/Input.tsx @@ -406,3 +406,17 @@ export const InputFieldWithSelect = forwardRef< /> ); }); + +export const NumberInput = forwardRef(function NumberInput(props, ref) { + return ( + + ); +}); diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx index c50eb3f529..5bda0c11da 100644 --- a/packages/ui/index.tsx +++ b/packages/ui/index.tsx @@ -56,6 +56,7 @@ export { SettingsToggle, Stepper, Switch, + NumberInput, } from "./components/form"; export type { ITimezone, ITimezoneOption } from "./components/form"; export {