Page 1 of 1

Javascript API and Datepicker don't work with jQuery

Posted: Wed Nov 27, 2013 11:14 pm
by Matt6097125

Is there some trick to get the Javascript API to work with the datepicker component. I'm using Appery('event_date') and then trying to run jQuery functions on it. For instance, Appery('event_date').css('background-color','red'); throws an error saying it can't find the css function. Similarly, the "find" function failed as well. Is there something I need to do to be able to get the input element for a datepicker?

(Ultimately, all I'm trying to do is set the default date to blank and I'm trying to do this through jQuery).

Thanks for the help


Javascript API and Datepicker don't work with jQuery

Posted: Thu Nov 28, 2013 4:51 am
by Illya Stepanov

Hi Matt,

Check this link it should help :: https://getsatisfaction.com/apperyio/...


Javascript API and Datepicker don't work with jQuery

Posted: Mon Dec 02, 2013 6:52 pm
by Matt6097125

Hi Illya,

I think I may have diluted my question with that example.

I was wondering if I can use jQuery with the Appery Javascript API like it says in the documentation. I'm thinking the datepicker is a special exception where it's only using your API and not chaining jQuery.

Can you confirm whether or not I can use jQuery chained with the Appery function on datepicker components?

Thanks for the clarification.


Javascript API and Datepicker don't work with jQuery

Posted: Mon Dec 02, 2013 7:34 pm
by Kateryna Grynko

Hi Matt,

Yes, you can.


Javascript API and Datepicker don't work with jQuery

Posted: Mon Dec 02, 2013 7:47 pm
by Matt6097125

Excellent. Can you tell what's wrong with the following syntax?:

Appery("event_date").css("background-color","red");

When I do this, I'm getting "TypeError: Appery(...).css is not a function".

This code works fine with a text component, so it must be something with the datepicker. I then tried wrapping the Appery object is jQuery and it's still not working.

$(Appery("event_date")).find("input").css("background-color","red");

What would be the proper syntax to make the datepicker input have a red background?


Javascript API and Datepicker don't work with jQuery

Posted: Mon Dec 02, 2013 9:37 pm
by Kateryna Grynko

Hi Matt,

Please try the following: preAppery("event_date").datapickerRoot.css("background-color","red");/pre


Javascript API and Datepicker don't work with jQuery

Posted: Fri Dec 06, 2013 4:10 pm
by Matt6097125

There we go. The datepickerRoot brought back jQuery.

My apologies if this is all in the documentation, but I'm not finding anything about it. Do you know if there are any other funky widgets I should be aware of where one needs to access an additional property to pick up the jQuery object?


Javascript API and Datepicker don't work with jQuery

Posted: Fri Dec 06, 2013 5:13 pm
by Kateryna Grynko

Hi Matt,

Here you can find the functions that are not documented: https://github.com/exadel-jqm-contrib...