primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Calendar: Cannot paste new value when mask is present (keeps old value)

Open rmartineztcti opened this issue 4 months ago • 0 comments

Describe the bug

When I have a mask on my Calendar component and I try to paste a valid date from my clipboard, I see that the new value that I'm trying to set doesn't show on any function like parseDateTime.

It looks like the library is deleting this value even before it makes it available to the api of any function (onChange, parseDateTime...).

Reproducer

https://stackblitz-starters-frufzshp.stackblitz.io

System Information

"primereact": "^10.9.2",
"react": "18.2.0",

Steps to reproduce the behavior

  1. Copy a valid date with this format 01/01/2005
  2. Paste it in the Calendar input box
  3. Watch it keeping the old value and not coming in the function parseDateTime

Expected behavior

I would expect the new value to be set in the Calendar input box

rmartineztcti avatar Aug 26 '25 10:08 rmartineztcti