Primefaces 5< p:日历>不显示选择时间的选项 [英] Primefaces 5 <p: calendar> does not display the option to select time
问题描述
需要使用带有选项的p:calendar组件来选择日期和时间(小时,分钟和秒).
Need to use the component p:calendar with the option to select the date and time (hours, minutes and seconds).
问题在于未显示选择时间的选项,仅显示了选择日期的选项.我正在使用以下模式"dd/MM/yyyy HH:mm:ss".
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".
根据 primefaces展示,不需要附加属性来显示计划选项,仅定义模式.
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
Managed Bean
@Named
@ViewScoped
public class CalendarMB implements Serializable {
private Date date;
// get/set
}
我使用素数5.0和5.1进行了测试
I performed the tests with primefaces 5.0 and 5.1
修改
发现问题的原因. jQuery版本冲突.我们有一个模板,其中包含以下代码<h:outputScript library="comum" name="javascript/jquery-1.10.2.js" />
,通过删除此导入组件可以按预期方式工作.谢谢大家的帮助
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
推荐答案
发现了问题的原因. jQuery版本冲突.
我们有一个模板,其中包含以下代码<h:outputScript library="comum" name="javascript/jquery-1.10.2.js" />
,通过删除此导入组件可以按预期方式工作.谢谢大家的帮助
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
这篇关于Primefaces 5< p:日历>不显示选择时间的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!