Skip to content

fix(phone-input): add Austria mask and prevent double plus prefix #26626

Merged
anikdhabal merged 4 commits intocalcom:mainfrom
abhayymishraa:fix/phone-input-austria-mask-24193
Jan 13, 2026
Merged

fix(phone-input): add Austria mask and prevent double plus prefix #26626
anikdhabal merged 4 commits intocalcom:mainfrom
abhayymishraa:fix/phone-input-austria-mask-24193

Conversation

@abhayymishraa
Copy link
Contributor

What does this PR do?

This PR improves the PhoneInput component by addressing inconsistent phone number formatting and user experience issues:

  1. Added Austria mask - Adds a custom phone mask for Austria (at) to improve number grouping from the odd default +43 123 456789 to a cleaner +43 XXX XXX XXXX format
  2. Prevents double plus prefix - Modified the onChange handler to check if the value already starts with + before prepending it, preventing issues like ++1234567890 when users paste numbers that already include the prefix

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

Fixed the issue:

Screen.Recording.2026-01-09.at.10.12.59.PM.mov

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Test the Austria Mask:

  1. Start the dev server: yarn dev
  2. Navigate to Event Types → Edit any event type
  3. Go to Advanced tab → Add Phone Number question → Save
  4. Click Preview to open the booking page
  5. In the phone input, select Austria (+43) from the country dropdown
  6. Type: 6601234567
  7. Expected: Numbers should be grouped as 660 123 4567

Test the Double Plus Prevention:

  1. In the same phone input
  2. Copy and paste: +436601234567
  3. Expected: Should display correctly, NOT as ++436601234567

Checklist

@vercel
Copy link

vercel bot commented Jan 9, 2026

@abhayymishraa is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the Low priority Created by Linear-GitHub Sync label Jan 9, 2026
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jan 9, 2026
@github-actions github-actions bot added the 🐛 bug Something isn't working label Jan 9, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/features/components/phone-input/PhoneInput.tsx">

<violation number="1" location="packages/features/components/phone-input/PhoneInput.tsx:84">
P1: The double plus prevention fix is incomplete. `BasePhoneInputWeb` (line 128) still uses the old pattern `onChange(\`+${val}\`)` and will produce `++` when users paste numbers with the prefix. Consider applying the same fix to maintain consistency.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@abhayymishraa
Copy link
Contributor Author

abhayymishraa commented Jan 11, 2026

@pallava-joshi @dhairyashiil could you take a look into it?

@anikdhabal
Copy link
Contributor

@@cubic-dev-ai can you pls review the changes again?

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Jan 13, 2026

@@cubic-dev-ai can you pls review the changes again?

@anikdhabal I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@anikdhabal anikdhabal enabled auto-merge (squash) January 13, 2026 19:21
@anikdhabal anikdhabal added the run-ci Approve CI to run for external contributors label Jan 13, 2026
@anikdhabal anikdhabal merged commit 5fa76f9 into calcom:main Jan 13, 2026
28 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Phone Number Formatting Across Country Codes in PhoneInput Component

2 participants

Comments