Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36075

Date selector in forms errors in IE7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.3
    • 2.3.2
    • Forms Library
    • None
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • wip-MDL-36075_MASTER
    • Hide

      To test you need either a PC running Internet Explorer 7 or software such as IETester. JavaScript debugging should be enabled in Internet Explorer advanced settings (so you are notified of JavaScript errors).

      Moodle requirements:

      1. Moodle instance on version 2.3+
      2. Manager/editing teacher login
      3. At least 1 course, where user has capability to edit course settings

      The error relates to any Moodle form using formslib that has a date selector in it. This can be tested using the following steps:

      1. Login to a moodle instance
      2. Access the test course e.g. http://qa.moodle.net/course/view.php?id=3
      3. Select 'Edit settings' from the Settings block
      4. You should see no JavaScript errors relating to M.form.dateselector
      5. The course start date field should work as expected (Dynamic calendar appears on selection)
      Show
      To test you need either a PC running Internet Explorer 7 or software such as IETester. JavaScript debugging should be enabled in Internet Explorer advanced settings (so you are notified of JavaScript errors). Moodle requirements: Moodle instance on version 2.3+ Manager/editing teacher login At least 1 course, where user has capability to edit course settings The error relates to any Moodle form using formslib that has a date selector in it. This can be tested using the following steps: Login to a moodle instance Access the test course e.g. http://qa.moodle.net/course/view.php?id=3 Select 'Edit settings' from the Settings block You should see no JavaScript errors relating to M.form.dateselector The course start date field should work as expected (Dynamic calendar appears on selection)

      When viewing any page with a form with a date selector element in IE7 (I know it's not supported now - but some end users still have it!) you see a JavaScript error relating to dateselector and the date selector JavaScript UI (popup calendar) does not work.

      JS error:
      M.form.dateselector is null or not an object

      Sometimes this error affects other JavaScript on the page and will stop other form elements such as the text editor initialising.

      On investigation I can see the error occurs because there is a trailing comma on line 223 lib/form/yui/dateselector/dateselector.js that was added for MDL-31622.
      IE7 does not like having a trailing comma in objects and doesn't run the script in the file - removing it stops the error and makes the date selector elements in the form work as expected.

            jp76 Jason Platts
            jp76 Jason Platts
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.