Primefaces 5 <p: calendar> does not display the option to select time

前提是你 提交于 2019-12-13 07:35:12

问题


Need to use the component p:calendar with the option to select the date and time (hours, minutes and seconds).

The problem is that the option to select the time is not displayed, only the option to select the date. I am using the following pattern "dd/MM/yyyy HH:mm:ss".

According to primefaces showcase no additional attribute is required for display of schedule options, only define the pattern.

<p:calendar pattern="dd/MM/yyyy HH:mm:ss" value="#{calendarMB.date}" timeZone="GMT-3" />

Managed Bean

@Named
@ViewScoped
public class CalendarMB implements Serializable {

    private Date date;

    // get/set
}

I performed the tests with primefaces 5.0 and 5.1


Edit

Discovered the cause of the problem. Conflicting versions of jquery. We have a template with the following code <h:outputScript library="comum" name="javascript/jquery-1.10.2.js" /> By removing this import component worked as expected. Thank you all for the help


回答1:


Discovered the cause of the problem. Conflicting versions of jquery. We have a template with the following code <h:outputScript library="comum" name="javascript/jquery-1.10.2.js" /> By removing this import component worked as expected. Thank you all for the help



来源:https://stackoverflow.com/questions/26382626/primefaces-5-p-calendar-does-not-display-the-option-to-select-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!