Incorrect dates passed to daygridMonth header
See original GitHub issueReduced Test Case
Bug Description
Describe how to recreate the bug.
Use props dayHeaderFormat
or dayHeaderContent
to change header display on daygridMonth
. In both cases the date passed to those functions is incorrect - points to Jan 1970.
What do you expect to happen?
Correct date should be passed to formatting/rendering functions just like in the other views.
What happens instead?
Incorrect date is passed - it’s always Jan 1970.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (3 by maintainers)
Top Results From Across the Web
javascript - Incorrect year passed to dayGridMonth header in ...
The dayHeaderContent and dayHeaderFormat hooks passes on arguments wrong date on dayGridMonth view, they always point to January 1970?
Read more >validRange - Docs - FullCalendar
Limits which dates the user can navigate to and where events can go. ... Dates outside of the valid range will be grayed-out....
Read more >Edit week day names to show fullname instead of short
Is there any way we can fetch the location on the calendar alongwith the event name? And can I hide the past events...
Read more >Insert the date or time in a header or footer - Microsoft Support
For example, in an expense report form template, you might want start and end dates for the expense period to print in the...
Read more >@fullcalendar/daygrid | Yarn - Package Manager
fixed: timeline view (without resources) problem with expanding height (#5792); fixed: locales not working in IE11 (#6790) ...
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
When FullCalendar wants to pass just dates (ignoring time) or, like in this case, just a bit of information from a date, it passes a
Date
object with the hours set to 00. The problem is thatDate
always considers the local timezone, so in places with negative offset, it becomes the previous day.Example when working with a UTC-3 timezone:
The solution is, parse it as UTC with moment:
I would also expect it to behave like v4: Incorrect(v5):
Correct(v4):
As ‘dayHeaderFormat’ currently no longer works properly.