7
Views
4
Comments
Solved
[FullCalendar 2] Example for O10 not working
Forge component by Grazina
30
Published on 29 Mar 2019
Application Type
Traditional Web
Service Studio Version
10.0.1022.0
Platform Version
10.0.828.0

Hi,

I need a version for OS 10 - both the core component and the example program.

Version 4.0.1 for O10 seems to be from O11 - the Platform refuses to publish it.

Version 4.0.0 is installable but the example program says everywhere: "Invalid date" (see the attachment). The same is on all pages in all modes.

Should I do some corrections in the sample program before launching it?

Regards

Tomasz

Capture.PNG

Solution

Hi,

I've drilled this issue down.The solution is not changing the current value of the defaultDate parameter, not changing its type inside the control (as some other guy suggested)  but changing the only usage of this parameter (in FullCalendarWebBlock). Instead of the line:

defaultDate:'"+ DateToText(defaultDate) +"',

I've used the following one:

defaultDate:'"+ FormatDateTime(defaultDate, "yyyy-MM-dd") +"',

and this works independently from the Service Center settings and no code outside is to be changed.

Regards

Tomasz

Rank: #414

Hello Tomasz,

That was actually what I meant, I guess I didn't explain myself correctly. 

Changing the date setting for the whole environment would never be a good solution, but adapting the calendar's script to be able to read the date in its preferred content works independently of the data setting in the environment, as you've said.

Regards,

Anna

Rank: #414

Hello Tomasz,

This is most likely due to the date format in the environment you're using. See: https://www.outsystems.com/forums/discussion/58644/fullcalendar2-error-cannot-read-property-getutcfullyear-of-null/

Try to change the defaultDate input value used in the example to FormatDateTime(CurrDate(), "yyyy-MM-dd")  and see if it helps.

Regards, 

Anna

Hi Anna,

Yes, your diagnose is right. But... it is ridiculous.... it makes the whole component useless..... how can I  convince my customer, that pays for may software, that he must use some specific date format that is not his favourite one? 

Regards

Tomasz

Solution

Hi,

I've drilled this issue down.The solution is not changing the current value of the defaultDate parameter, not changing its type inside the control (as some other guy suggested)  but changing the only usage of this parameter (in FullCalendarWebBlock). Instead of the line:

defaultDate:'"+ DateToText(defaultDate) +"',

I've used the following one:

defaultDate:'"+ FormatDateTime(defaultDate, "yyyy-MM-dd") +"',

and this works independently from the Service Center settings and no code outside is to be changed.

Regards

Tomasz

Rank: #414

Hello Tomasz,

That was actually what I meant, I guess I didn't explain myself correctly. 

Changing the date setting for the whole environment would never be a good solution, but adapting the calendar's script to be able to read the date in its preferred content works independently of the data setting in the environment, as you've said.

Regards,

Anna