[VISJSTimeline] Date/Time localisation bug/enhancement

[VISJSTimeline] Date/Time localisation bug/enhancement

Forge Component
Published on 12 Oct (11 days ago) by OutSystems Labs
5 votes
Published on 12 Oct (11 days ago) by OutSystems Labs
At the moment, when one provides a Date Time for Item.StartDateTime and Item.EndDateTime, these values are implicitly converted to a string when building the JavaScript code. The JS expects the format to be MM/DD/YYYY HH:MM:SS. (Not actually sure how the time part should be formatted -- should this be 24 hour or AM/PM. What about fractions of a second?)

If the Outsystems environment is configured to use DD/MM/YYYY format (or, even worse, something like YYYY-MM-DD) then when the JS string is built, this is used instead, caausing the date to be interpretted wrong (e.g. 7th April becomes 4th July) or not at all (UK format 16/06/2016 is not a valid data in US format).

Would be great if the app could be modified to explicitly convert the Date Time to string, with something like...

FormatText(Month(DateTime), 2, 2, True, "0") + "/" + 
FormatText(Day(DateTime), 2, 2, True, "0") + "/" + 
Year(DateTime) + " " +
FormatText(Hour(DateTime), 2, 2, True, "0") + ":" +
FormatText(Minute(DateTime), 2, 2, True, "0") + ":" +
FormatText(Second(DateTime), 2, 2, True, "0")#

Thanks for your work on a really powerful extension!
Hi Mathew,

I completelly agree with your suggestion.
I will take a look on that and upload a new version with this change.

Thank you,
Great! Thanks a lot.