[FullCalendar Reactive] Error "Cannot read property 'getUTCFullYear' of null"

Forge Component
(1)
Published on 16 Mar (2 weeks ago) by Alexandre Santos
1 vote
Published on 16 Mar (2 weeks ago) by Alexandre Santos

I'm receiving this error and calendar is not showing: "Cannot read property 'getUTCFullYear' of null".

Tried several solutions taken from web, but without results.

Any help ?

 

I ran into this same problem as well.  I think it relates to the region you are in and how your date is formatted on the server.   FullCalendar does not like MM-DD-YYYY format.  The fix is to format it to YYYY-MM-DD format.

If you go into the FullCalendarReactive Module, in the BuildOptions Client Action of the FullCalendar block, you can change the DefaultDate there to format it.  This is the Assign of "Add DefaultDate + Plugins":

Perhaps there is a better location to place the fix, but that is where I put mine.



Casey



Casey Preuss wrote:

I ran into this same problem as well.  I think it relates to the region you are in and how your date is formatted on the server.   FullCalendar does not like MM-DD-YYYY format.  The fix is to format it to YYYY-MM-DD format.

If you go into the FullCalendarReactive Module, in the BuildOptions Client Action of the FullCalendar block, you can change the DefaultDate there to format it.  This is the Assign of "Add DefaultDate + Plugins":

Perhaps there is a better location to place the fix, but that is where I put mine.



Casey



Thank you Casey.
(believe it or not, I arrived at exactly same solution one minute ago. I was now re-opening this discussion to proudly announce it , discovering instead that you was the first  :-)  )


Thank you guys for the feedback. We will try to see if this is the best fix or if there is a different solution, so this can on the component by default.

Just to collect some more data, what is your server timezone?

And how can we replicate your scenario to view this bug?

I am in the Central Timezone, and use the format MM-DD-YYYY on my Server.   If you did the reverse of what we did and FormatDateTime(CurrDate(),"MM-dd-yyyy") in the above area I screenshot of (or changed the Date Format in Service Center),  you would experience that error.    Any format other then YYYY-MM-DD does not meet the ISO8601 specification it is looking for when it is a string value.

So far in my limited testing I haven't experienced any problems outside the Default Date. I am now about to start implementing it, but as of yet have not experienced any other problems besides that initial one.


Casey

Alexander hi,

Is there an update available for this error? I am getting the same, I saw it is somewhere embedded in the JavaScript. I am not sure how to resolve, please advice.

Saludos,

Wilko

I have the same problem but for Traditional Web application, someone have a solution to this problem ? [FULL CALENDAR2]


Solution

Hi guys!


Sorry for the long wait. We had some issues with the personal environment where we had the developments of this component.

Just updated the component and Demo on Forge, so it should work now without any problems.


Regarding the issues, after a bit digging, we ended up using the solution provided by Casey Preuss, using the FormatDateTime() function. 


Just to state the problem, and that maybe can help Hugo and others, the problem that we were not aware of is that the DateToText() function is configured in ServiceCenter configurations in the Administration tab. In our case, we were using the default date format so we didn't had any problems. 

If you changed the DateFormat option, you would need to use the FormatDateTime, so now it's updated on the component to use that by default.


Solution

Alexandre hi,

thanks for the new version, works like a charm. Maybe Fietta can mark it as a solution?

Saludos,

Wilko

wilko odijk wrote:

Alexandre hi,

thanks for the new version, works like a charm. Maybe Fietta can mark it as a solution?

Saludos,

Wilko

You welcome! :)

Cheers


Hi Alexander,

Sorry for late answer, solution works fine,  thank you.