[calendar] Parsing date in format yyyy-mm-ddT00:00:00 in Firefox
See original GitHub issueBug 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
- 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
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Date.parse() - JavaScript - MDN Web Docs
The Date.parse() method parses a string representation of a date, ... A string representing a simplification of the ISO 8601 calendar date extended...
Read more >new Date() is working in Chrome but not Firefox - Stack Overflow
A string representing an RFC2822 or ISO 8601 date (other formats may be used, but results may be unexpected). So, when you want...
Read more >Converting string to Datetime is showing Invalid Date error in ...
In my AngularJs application, I am getting the date in string format which I need to convert to datetime and show in a...
Read more >Invalid Date issue in Safari and Firefox-moment.js
[Solved]-Could not parse date parameter: Invalid Date issue in Safari and Firefox-moment.js ... Issue was with the moment method to format the date....
Read more >How to convert Date to DateTime format | Support Center
n oracle SQL - PRPC_READ_FROM_STREAM() function I am getting values in this format "yyyyMMddtHHmmss.SSS zzz". how to convert this into YYYY-DD- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👀 Confirmed… (using browserstack) We’ll check this. In the meantime you can use “/” instead of “-” as a workaround, which works in Safari
https://jsfiddle.net/rbsf72zc/
@whsyu Your issue with safari is fixed by #1647 See https://jsfiddle.net/lubber/s82zoc5w/1/