Bug 33886 - Flatpickr calendar - year controls for date of birth on memberentry.pl are not intuitive
Summary: Flatpickr calendar - year controls for date of birth on memberentry.pl are no...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23003
  Show dependency treegraph
 
Reported: 2023-06-02 10:37 UTC by Sally
Modified: 2023-10-09 15:03 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sally 2023-06-02 10:37:53 UTC
I appreciate a lot of work has gone into swapping from the now-obsolete datepicker to flatpickr.

However, when entering a date of birth on the joining form (memberentry.pl), on both the staff intranet and the public OPAC, flatpickr is not intuitive for users.

For the staff, having a form cause frustrations when you're welcoming new patrons is not ideal - but at least we can train the staff on flatpickr's quirks.

For new patrons trying to join on the OPAC, it's impossible to explain how to use it to them.  We are concerned that patrons may choose not to join because of difficulty with the date of birth field.  

Full explanation:  

Koha previously used datepicker.  It was possible to enter dates using just the keyboard (typing in), or just the mouse (using the datepicker calendar).

With flatpickr, you can use the keyboard (typing in) - but if you attempt to use flatpickr as mouse-only, it's extremely long-winded.  Flatpickr appears to be designed for mouse+keyboard together, which is unusual - and unexpected for the end user - in a calendar. 

With datepicker, the mouse workflow was:

- Click to open datepicker.

Then work from left to right, top to bottom:

- Use the dropdown menu to select month.
- Use the dropdown menu to select year.
- Click on the date to select the date.

These steps were all handled by the mouse alone.

Using flatpickr, the mouse workflow is:  

- Click to open flatpickr

Note that you cannot work from left to right.  This is because flatpickr initialises with today's date.  If you have a patron who is born in October but the current month is June, then October doesn't show in the month dropdown (as it's a date in the future).  

This means you have to start with the year, which is counterintuitive, as it's working right to left.  

- There is a box to type the year into - meaning that it's not mouse-only.  Many average computer users might not even realise that this box can be typed into.  Depending on how you use a mouse/keyboard (particularly Tenkey users), typing in can mean lifting your hand from the mouse to use the keyboard and going back again.  

- The year controls do not display until mouseover, so it's not immediately apparent to all users how the year can be manipulated - especially as this is juxtaposed with the permanently visible month dropdown controls. 

- When hovering over the year, the arrow controls then appear - and if you're expecting mouse-only input, you may believe you need to use these, rather than typing the year.

- The arrow controls only increment +/- 1 year.  It's not possible to click and hold to jump +/- 10 years, for example.  If you try to use flatpickr as mouse-only and your patron was born in the 1950s, you'll be clicking for a very long time.

So the mouse-only workflow ends up being:

- Click to open flatpickr
- Have to remember to work from right to left
- Hover over the year so the arrow controls show
- Click 70 times to get back to 1953
- Go right to left to the month drop down to select the month
- Then select the date

If you choose to type in the year instead, it feels as if it's defeating the object of having a calendar, as you've already typed in 4 digits out of an 8 digit date.

Frequent requests have been made to the developer on GitHub for a change to this workflow, but the developer prefers their existing implementation - so a change would need to be a plugin.

To alleviate the friction with the year selection, is there a plugin that can be adopted/written/implemented?

It doesn't have to be a dropdown plugin; in other calendars, there are different mouse-only methods of handling years, for example:  https://element.eleme.cn/#/en-US/component/date-picker (this style is used in Windows).

There's some discussion of this on StackOverflow:  https://stackoverflow.com/questions/51425067/flatpickr-adding-dropdown-to-change-year - including some solutions.

And there's a recent (May 2023) dropdown plugin linked from that page:  https://gist.github.com/ZachSaucier/ec6f58e49082c27eaae240786bc82997

Please could a plugin be considered?  Or a different method of handling year inputs, at least where date of birth is a flatpickr field?
Comment 1 Katrin Fischer 2023-06-08 13:24:42 UTC
Maybe being able to type the year/date again is a little help here:
Bug 33821 - OPAC flatpickr no longer allows for direct input of date
Comment 2 Sally 2023-08-10 14:43:50 UTC
Is it possible to launch flatpickr with a different date, rather than today?  

It wouldn't resolve the problem, but it would mitigate it slightly.

If it initiated say, 20 years ago, rather than with the current date, at least every user can select their date and month - and then they can try to work out the year controls after.

At the moment, if you try to join on the OPAC (or via the staff client) and your birthday is the 20th of November, you have to change the year first - whilst those born on the 4th of April don't.  It's not intuitive.