[Koha-bugs] [Bug 33886] New: Flatpickr calendar - year controls for date of birth on memberentry.pl are not intuitive

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 2 12:37:53 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33886

            Bug ID: 33886
           Summary: Flatpickr calendar - year controls for date of birth
                    on memberentry.pl are not intuitive
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Patrons
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: sally.healey at cheshiresharedservices.gov.uk
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

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?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list