From 5fa76f943bdc8e2bf6394ecdb323d642dbf37c20 Mon Sep 17 00:00:00 2001 From: Abhay Mishra Date: Wed, 14 Jan 2026 00:52:15 +0530 Subject: [PATCH] fix(phone-input): add Austria mask and prevent double plus prefix (#26626) * fix(phone-input): add Austria mask and prevent double plus prefix (#24193) * updated code * Update Austria phone mask format --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> --- packages/features/components/phone-input/PhoneInput.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/features/components/phone-input/PhoneInput.tsx b/packages/features/components/phone-input/PhoneInput.tsx index 8d644266e2..8894a9cc3d 100644 --- a/packages/features/components/phone-input/PhoneInput.tsx +++ b/packages/features/components/phone-input/PhoneInput.tsx @@ -14,6 +14,7 @@ import classNames from "@calcom/ui/classNames"; const CUSTOM_PHONE_MASKS = { ci: ".. .. .. .. ..", bj: ".. .. .. .. ..", + at: "... ..........", }; export type PhoneInputProps = { @@ -80,7 +81,7 @@ function BasePhoneInput({ autoComplete: "tel", }} onChange={(val: string) => { - onChange(`+${val}`); + onChange(val.startsWith("+") ? val : `+${val}`); }} containerClass={classNames( "hover:border-emphasis focus-within:border-emphasis border-default !bg-default rounded-md border focus-within:outline-none focus-within:ring-0 focus-within:ring-brand-default disabled:cursor-not-allowed", @@ -132,7 +133,7 @@ function BasePhoneInputWeb({ autoComplete: "tel", }} onChange={(val: string) => { - onChange(`+${val}`); + onChange(val.startsWith("+") ? val : `+${val}`); }} containerClass={classNames( "hover:border-emphasis focus-within:border-emphasis border-default !bg-default rounded-md border focus-within:outline-none focus-within:ring-0 focus-within:ring-brand-default disabled:cursor-not-allowed",