at the moment, this works for my
in view:
<g:datePicker name='fixDate' value="${problem?.fixDate}"
default="none" noSelection="['':'---']" precision="day"
years="${2007..2009}"></g:datePicker>
in the controller:
def save = {
if (params.fixDate_year == '' | params.fixDate_month == '' |
params.fixDate_day == '')
{
params.fixDate = null
}
.......... default controller ........................
}
2007/11/6, Marcel Overdijk <
marceloverdijk@...>:
>
> I seem to have the same issue with rc1. This was not the case in previous
> versions.
>
> I've created
http://jira.codehaus.org/browse/GRAILS-1793.
>
>
> Cheers,
> Marcel
>
>
> Alberto Gallen wrote:
> >
> > Hi,
> >
> > I need that the date can be null, and always get "Date not valid"
> >
> > My example
> > ---- Class Domain ------------
> > class Problem {
> > String coment;
> > Date fixDate=null;
> >
> > static constraints = {
> > fixDate(nullable:true)
> > coment(maxSize:255,blank:false)
> > }
> > }
> > ---- part of Controller --------------
> > def create = {
> > def problem = new Problem()
> > problem.properties = params
> > problem.fixDate = null
> > return ['problem':problem]
> > }
> > ------- View -------------------------
> >
> > <g:datePicker name='fixDate' value=null noSelection="['':'---']">
> >
> > alternative and different proven combinations:
> > <g:datePicker name='fixDate' value="${null}"
> > noSelection="['null':'---']">
> >
> > Someone can help me with an example ?
> >
> > Thank's in advance
> >
> > --
> > Alberto Gallen
> > alberto.gallen (algarroba) gmail (punto) com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >
http://xircles.codehaus.org/manage_email> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/Date-not-valid%3A-date-can-be-null--tf4759422.html#a13612476> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
--
Alberto Gallen
alberto.gallen (algarroba) gmail (punto) com
Tfno 654.376600
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email