Uploaded image for project: '{RETIRED} XWiki Contrib'
  1. {RETIRED} XWiki Contrib
  2. XCONTRIB-112

Date Picker: Improve placement, triggering of the calendar and focus management of the date field

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Date Picker 1.1
    • Date Picker 1.0
    • Date Picker
    • None

    Description

      Here are some of the issues that is mitigated:

      • The box is not placed properly just under the field, but at a constant distance of 30 px. Depending on browser this put the box well or not. You may set the topOffset to another value, but it is relative to the top of the field, which is not pratical.
      • When you click the input field, with the intend to manually encode a date, the calendar open, and you have to close it since...
      • By default, the calendar does not close when you leave the date field. Since it is placed at the end of the body, this break normal tabbing.
      • The CloseOnBlur which is aimed to solve previous issues, has a serious problem. Since the calendar itself could receive the focus, it close when you click to change months. The delay before closing is also too long, which is confusing.
      • You may use an external image to trigger the calendar, which is IMO less invasive and clearer, but this does not remove the triggering by the input field and defeat the purpose.
      • It does not work in a lightbox

      There is no perfect solution, and some my choice are arbitrary and could probably be improved, but the attached patch provide the following improvements:

      • ensure the focus stay on the field while the calendar is in use, and you cannot leave the field while over the calendar.
      • closing on blur is done properly, and if not used, leaving the field require to close the calendar first, preventing that many calendars open simultaneously.
      • it works in lightbox
      • a image is attached to the extension for a default image for external trigger
      • when external trigger is used, the input field does not trigger the calendar

      It also provide fixes for XCONTRIB-108, and put standard copyrights with credits to the original code.

      Attachments

        Activity

          People

            softec Denis Gervalle
            softec Denis Gervalle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: