Javascript OnClick Button
Application Type

Hi OS Community,

I'm new in javascripting in Outsystems and I'm doing a component for calendar with Javascript. But I'm having a problem with the compatibility in ES6. Please see pic below

What I needed to do is to have a button in my calendar like the buttons below the calendar.

Does anyone know what is the problem with my code? 

Thank you,


Hi Jeriel,

What the warning is saying is that the syntax you are using after the OnClick where you put the symbols '=>':

onClick (index,fp) => {

is only available in ES6, check this link for more info on what is ES6.

What you should do, if you want to support older JS versions,  is use a different syntax, see here.


    onClick: (index,fp) => {

 should look like this in your code: 

   onClick: function(index,fp){

Hope it helps,

Cheers and Regards,

RR :)

Hi Rr,

It worked! Awesome.

Thank you,


That's great Jeriel!
Happy to help ;)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.