Property date must be a valid Date error, when using jquery UI plugin

£可爱£侵袭症+ 提交于 2019-12-05 23:56:16

I assume you're getting a String like '02/16/2012'? You could just call:

params.date = Date.parse( 'MM/dd/yyyy', params.date )

Before creating the Task object...

There's probably an automatic way of doing this in Grails as well using PropertyEditorSupport


Edit

Also, in grails 2.0, you can do:

def date = params.date( 'myVar', 'MM/dd/yyyy' )

To parse the date param out of the params object

It seems this format does'nt supported with jquery change date format

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