Using utility objects in javascript inline mode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using utility objects in javascript inline mode

Loulou
Hello,

I tried to use the following code to format a date with javascript inline mode :
[[${#calendars.format(myDate,'dd/MM/yyyy HH:mm:ss')}]]

But I got the error message in the browser : "Uncaught SyntaxError: Unexpected token {".

Could you help please ?

Best regards
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Using utility objects in javascript inline mode

Zemi
Administrator
Hello,

I have just tried your code inside and inlined element and it works OK (changing myDate for a real Date object).

So maybe the issue is in some other place.

Regards,
   Zemi

Reply | Threaded
Open this post in threaded view
|

Re: Using utility objects in javascript inline mode

Loulou
OK thanks very much Zemi. I found my problem :)