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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -