bug in primefaces calendar timepicker?

旧城冷巷雨未停 提交于 2019-12-02 08:53:55

PrimeFaces uses SimpleDateFormat by default unless you override the formatter. http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

EDIT Your pattern will work if you change your mindate attribute to be the same as your pattern.. IE: You can't have a pattern dd-MM-yyyy HH:mm when you have a mindate="01/09/2013" Change your mindate to - 01-09-2013

EDIT 2 AFter debugging a fair bit you're right, there seems to be a bug when setting the inputValue field in javascript prior to being sent in the POST to the server to even use the pattern converters...

I got it all working recompiling the code with the following changes: Line 129 in calendar.js (gets merged into primefaces.js) var newDate = this.value;

Basically at the moment it tries to do a formatDate on the input which is fine cause its the same date format split ie, dd/mm/yy etc.. but it totally skips 'time' being attached can't use parseDatetime as it does an entire object time, which should be don eon the java side as you just build the object.

this.value is what you want regardless to be sent back in the post which is what it does for _self.cfg.popup (it doesn't even set the input val because its already there!... I'll raise an issue with PF

"Raised Issue 6790 on the PrimeFaces Issue Tracker"

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