Reputation: 673
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
Upvotes: 1
Views: 3098
Reputation: 673
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
Upvotes: 2