primefaces / primefaces/primereact

Calendar: The Calendar should block unnecessary or invalid characters.

Open
#8,502 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Image

Calendar: The Calendar should block unnecessary or invalid characters. Screenshot attached.

Reproducer

No response

System Information
System:
    OS: Windows 11 10.0.26100
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 929.05 MB / 15.41 GB
  Binaries:
    Node: 22.21.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.15.0 - C:\Users\AkshayAntony\AppData\Roaming\npm\pnpm.CMD    
  Browsers:
    Chrome: 144.0.7559.133
    Edge: Chromium (140.0.3485.54)
    Firefox: 147.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe       
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
  1. Go to https://primereact.org/calendar/#basic
  2. Try choosing a date.
  3. Try updating the input box with unnecessary characters as shown in screenshot.
  4. The input box accepts the characters.
Expected behavior

The input box in Calendar component shouldn't accept unnecessary characters.
Should Intercept letters and other invalid characters before they're inserted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Calendar basic demo linked in the issue and reproduce the input behavior using the attached screenshot as reference. Verify which characters are accepted, then confirm that letters and other invalid characters are blocked before insertion; the issue is done when the Calendar input rejects those characters without disrupting valid date entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.