primefaces / primefaces/primereact

FloatLabel: Not returning inside of an empty input on a Calendar with mask

Open
#8,379 1 comment 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

When FloatLabel is paired with Calendar that has an initial state and a mask prop, removing the value doesn't bring back FloatLabel inside the input field. It keeps standing on top of an empty field.

Image
Reproducer

https://stackblitz.com/edit/vitejs-vite-der3y97g?file=src%2FApp.tsx

System Information
primereact: 10.9.7
Steps to reproduce the behavior
  1. Clear the date on the supplied example.
Expected behavior

FloatLabel should return to the empty input field that is not focused.

Image

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 with the supplied StackBlitz reproducer in src/App.tsx and inspect how Calendar with an initial value, mask, and FloatLabel behaves when the date is cleared. Confirm the fix by verifying that the label returns inside the empty, unfocused input.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.