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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -