Improved parsing of typed date/time

Idea created by on Nov 7, 2018
    Open for Voting


    Canvas' date/time parsing should be better at predicting what people are intending to type. For a Canvas user updating dates in Fall 2018, typing "Nov 5 3" should be parsed as "November 5th, 2018 at 3AM". Currently, Canvas parses "Nov 5 3" as "Nov 5, 1903 11:59PM" which is long before the term and course start dates and causes assignments to be erroneously locked/marked late. That causes an additional delay and frustration for an instructor trying to update their assignment dates. Instead of simply having to change AM to PM, they have to correct the year and time. If they attempt to use the date picker at this point, they'll be started in 1903 instead of 2018.


    Full description / how to see this in action:

    A faculty remember at Emerson reported issues with the date entry boxes in assignments, ie the "Due", "Available From", and "Available Until" boxes. He experienced the year jumping back into the early 1900s as he was updating his course dates.


    Through testing, it seems to happen only when typing the date into the box instead of using the date picker. To see this in action for yourself:

    1. Type the Month and day
    2. Press space
    3. Enter the number for a time WITHOUT entering am/pm

    At this point, if the professor clicks Save, if they hit enter, or if the entry box loses focus for any reason, the system will auto-populate the time from step 3 as the year. For example, "Nov 5 3" becomes "Nov 5, 1903 11:59PM".


    I also recorded a screencast to illustrate this problem:


    Further, there is nothing in the system that prevents the professor from saving and publishing the assignment with this early 1900s year, so they might not realize what happened until a student points it out. This can cause assignments to be locked (if the erroneous year was in the "until" box) and can cause all student submissions to be marked late (if the year was in the "Due" box).