Javascript Primefaces 5.2日历未定义
我正在将Primefaces的版本从3.0.1升级到5.2。 我现在使用myFaces 2.2.8和Primefaces 5.2。这次升级破坏了我的primefaces日历,我无法确定发生了什么: 我在我的Javascript Primefaces 5.2日历未定义,javascript,jsf,jsf-2,primefaces,Javascript,Jsf,Jsf 2,Primefaces,我正在将Primefaces的版本从3.0.1升级到5.2。 我现在使用myFaces 2.2.8和Primefaces 5.2。这次升级破坏了我的primefaces日历,我无法确定发生了什么: 我在我的p:calendar中使用了:widgetVar=“calendar”,但我无法再访问javascript变量calendar 这是我的示例页面: <h:body> <p:calendar popupIconOnly="true"
p:calendar
中使用了:widgetVar=“calendar”
,但我无法再访问javascript变量calendar
这是我的示例页面:
<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>
除了Primefaces之外,我不包括其他jquery或jquery ui。
popupiconly
也不起作用,但这是另一个主题
ReferenceError:未定义日历
在PrimeFaces 4.0中,您需要使用PF(“widgetVar”)而不是widgetVar,即PF(“日历”)
popupiconly
属性已从PrimeFaces 5.0中删除
ReferenceError: calendar is not defined