primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Calendar: Allow typing dates manually

Open inad9300 opened this issue 2 years ago • 4 comments

Describe the feature you would like to see added

As a user, I would like to be able to type dates using the keyboard, and not be forced to use the UI. A common case where this is necessary is having to type your birthday: using the UI would take lots and lots of clicks, while using the keyboard would be much more immediate.

Currently, the interaction with the calendar's input box is very cumbersome. Particularly, pressing delete/backspace will wipe out the entire input, making it impossible to make any type of correction, while unexpectedly trashing the user's current selection, forcing them to reselect a date from the beginning.

Another specific case where keyboard interaction is broken is selecting the current value and pressing a number. You can reproduce this directly in https://primereact.org/calendar by:

  1. Selecting a date through the UI.
  2. Selecting all the text in the input box with the mouse.
  3. Entering "2000" with the keyboard.
  4. Realizing you have just typed "000" (the "2" was ignored).

There are likely other cases...

In my opinion, the calendar is not usable as it is. In fact, we are currently deciding against it until these problems are solved, in favor of a plain input box, because we already foresee user complaints from putting it in place.

inad9300 avatar Mar 06 '23 09:03 inad9300

Should I work on it, are you guys planning to implement this feature ? @melloware

userkks avatar May 19 '23 14:05 userkks

you can give it a shot @userkks if you want! PR's are always welcome!

melloware avatar May 19 '23 17:05 melloware

Ok, @melloware, you can assign it me then.

userkks avatar May 19 '23 17:05 userkks

How's this going? Is @userkks proposal going to make it? Similar to time zone support, I see this as a fundamental feature of date pickers, as their point is to facilitate inputting dates, so the moment they get in the way of that, there is no point in using them.

inad9300 avatar Oct 18 '23 07:10 inad9300