[FullCalendar 2] Date format issues

Forge Component
(18)
Published on 13 Jan (4 days ago) by Grazina
18 votes
Published on 13 Jan (4 days ago) by Grazina
It seems like the webpart is only accepting US datetime format.
When the outsystems environment is placed in e.g dd-mm-yyyy functions as CurrDate() fail to work.
Is there a preset available to alter this behaviour?

regards,

Dave
I have the same problem !
Hi Louis,

I've found a workarround:

Change the datatype for the defaultDate input parameter to text in the FullCalendar olm.
Afterwards just rebuild the date with the following expression in your solution.

Year(CurrDate())+"-"+Month(CurrDate())+"-"+Day(CurrDate())

This will display the calendar on 'today'

Dave Saman wrote:

Hi Louis,

I've found a workarround:

Change the datatype for the defaultDate input parameter to text in the FullCalendar olm.
Afterwards just rebuild the date with the following expression in your solution.

Year(CurrDate())+"-"+Month(CurrDate())+"-"+Day(CurrDate())

This will display the calendar on 'today'

Hi Dave,

It works well. Thank you

This workaround is necessary because FC uses Moment objects. Currdate returns US format date - which does not bode well with Moment.
Moment supports - 'yyyy-MM-dd' format with ease and works well across browsers.

Dave Saman wrote:

Hi Louis,

I've found a workarround:

Change the datatype for the defaultDate input parameter to text in the FullCalendar olm.
Afterwards just rebuild the date with the following expression in your solution.

Year(CurrDate())+"-"+Month(CurrDate())+"-"+Day(CurrDate())

This will display the calendar on 'today'


Thanks It worked for me.

HI, I used this successfully, however (and I don't know if this is a result of our recent upgrade to 11 or the changing to 2019?) but all of a sudden the calendar came up with invalid date!

I have tried to rectify, but if I go back to using Date as the datatype and CurrDate() it always lands on a random month (at present March 2020). If I try to reset the datatype to text and reuse the solution it goes back to Invalid date.

Interestingly it works fine in Chrome, the problem appears when the application is opened in IE.


Any suggestions or thoughts?