groovy - How do make grails datePicker '0000-00-00 00:00:00' by default, instead of inserting blank or null? -
i using g:datepicker
, , in default selection in database inserting null, want insert '0000-00-00 00:00:00'.
<g:datepicker name="doseonedue" precision="day" noselection="['':'-choose-']" value="${immunizationinstance?.doseonedue}" relativeyears="[-2..5]" default="none"/>
well, never tried (and not have grails environment @ work today) try like
class mydomain { date adatefield static constraintes = { adatefield blank: false, defaultvalue: calendar.set(0,0,0,0,0) }
i not know if work date starts 1970 computers.
Comments
Post a Comment