问题
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