I'm upgrading my version of Primefaces from 3.0.1 to 5.2. I'm now with myFaces 2.2.8 and Primefaces 5.2. This upgrade broke my primefaces calendar and I cannot figure what happened :
I'm using : widgetVar="calendar"
in my p:calendar
but I cannot access the javascript variable calendar
any more.
Here is my sample page :
<h:body>
<p:calendar popupIconOnly="true"
showOn="button"
id="validityCalendar"
locale="fr"
navigator="true"
disabledWeekends="true"
style="padding-left:5px; padding-right:5px;"
widgetVar="calendar" size="10" />
<script type="text/javascript">
$(function() {
calendar.jqEl.datepicker("option", {maxDate : "11/07/2016", onChangeMonthYear : onChangeMonthYear});
});
</script>
</h:body>
And I get this error :
ReferenceError: calendar is not defined
I do not include another jquery or jquery-ui than the one of Primefaces.
The popupIconOnly
does not work either but this is another topic...