Skip to content

[calendar] Parsing date in format yyyy-mm-ddT00:00:00 in Firefox #1462

@scblack

Description

@scblack

Bug Report

On Firefox (I'm currently using the latest version 76.0.1), parsing a date such as 2018-08-13T00:00:00 results in August 13, 2000.

Steps to reproduce

See #935

  1. Using Firefox, supply the date in the format 2018-08-13T00:00:00 using set date

Expected result

August 13, 2018

Actual result

August 13, 2000

Testcase

https://jsfiddle.net/scblack/qzLvkxm9/1/

Additional Information

In the date parser, assuming text is '2018-08-13T00:00:00'.

It changes to lowercase with the following line:

text = ('' + text).trim().toLowerCase();

After this line, text is '2018-08-13t00:00:00', which is then used to attempt to create a date:

var textDate = new Date(text);

After this, textDate is an invalid date. Firefox doesn't seem to handle a lowercase 't'. when parsing the date.

Version

2.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser/firefoxAny issues relating to Mozilla Firefoxtype/bugAny issue which is a bug or PR which fixes a bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions