question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid time value error

See original GitHub issue

Hi, I have intalled angular-calendar and all its dependencies and after using

<mwl-calendar-month-view
  [viewDate]="viewDate"
  [events]="events">
</mwl-calendar-month-view>

I get some errors with the same message "Invalid time value at Date.toISOString " at this line from the angular-calendar.js var trackByWeekDayHeaderDate = function (index, day) { return day.date.toISOString(); };

Minimal reproduction of the problem with instructions

https://stackblitz.com/run

Screenshots image and it seems that the problem is here image

Versions

  • @angular/core : 5.0.0
  • angular-calendar:0.24.1
  • Browser name and version: Chrome

What do I do wrong?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mattlewis92commented, Jul 13, 2018

This error is triggered when passing an invalid date to the calendar (type new Date('invalid').toISOString() in the chrome console and you’ll see), my guess is that the value you’re passing to viewDate is an invalid date.

0reactions
db10101commented, Jul 19, 2018

I’m getting the exact same error after initial setup, where would you suggest I put that line? When I put it into my main, it says this.viewDate is invalid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RangeError: Invalid time value - javascript - Stack Overflow
This exception occurs when the Date object contains an invalid date. new Date('undefined').toISOString(). In this example the Date object ...
Read more >
RangeError: Invalid time value in JavaScript | bobbyhadz
The "Uncaught RangeError: Invalid time value" error occurs when calling a method on an invalid date, e.g. new Date('asdf').toISOString() .
Read more >
RangeError: invalid date - JavaScript - MDN Web Docs
The JavaScript exception "invalid date" occurs when a string leading to an invalid date has been provided to Date or Date.parse() .
Read more >
I get an error "RangeError: Invalid time value"
I am getting the same error but nothing was changed on our server so it's not like it was something that updated on...
Read more >
Invalid time value for field - - Common causes and quick fixes
Invalid time value for field - - Common causes and quick fixes. Prevent & resolve issues, cut down administration time & hardware costs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found