I want to be able to set the date picker day property based on the time. Thus if it is before 10:00am set the day to yesterday.
If it is after 10:00am I can just implement
<g:datePicker name="myDate" value="${new Date()}"/>
but how do you set the datepicker to display yesterday’s day?
Here is what you can do – When your page is rendered you can send in a boolean in the model which indicates whether the time is after 10:00 am or no. If yes, the model will contain the date from yesterdays else it will be todays date. Or you can compare the time on the client and if time is less than 10 do this