primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Calendar: with showTime and dateFormat, input field doesn't work

Open sbasken opened this issue 1 year ago • 5 comments

Describe the bug

If I set showTime to true and dateFormat to "MM d, yy", I can't change the input field by typing/ keyboard. It works if one of them is used but when both props are added, it stops working.

I tried changing display value by disabling the dateFormat and creating the function to format the date and use that function (for example: value={formatDate(dateTime)}), it renders blank in the field.

If there is any workaround that I could use and share with me, I'd appreciate it - thanks!

Reproducer

No response

PrimeReact version

10.2.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome Version 124.0.6367.60

Steps to reproduce the behavior

set showTime to true and dateFormat to "MM d, yy" and try changing the value in the input field manually by deleting and typing numbers.

Expected behavior

The selected date and time on the calendar should be updated along with the date and time in the input field.

sbasken avatar May 02 '24 21:05 sbasken

Have you tried 10.6.4? Recent changes were made around keyboard entry.

melloware avatar May 02 '24 23:05 melloware

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

github-actions[bot] avatar May 03 '24 12:05 github-actions[bot]

@melloware we haven't tried 10.6.4 - will do and see if that works, thank you!!!

sbasken avatar May 05 '24 15:05 sbasken

10.6.5 is out so try that!

melloware avatar May 05 '24 15:05 melloware

Thank you @melloware !!

sbasken avatar May 05 '24 17:05 sbasken