grails - default date for gdatepicker -


I'm using default gdatepicker in an application end date is a default for the current date that works fine, but I am not sure about the syntax for setting the start date dates for the July of last year. It seems that it should be quite easy, but I still have to find a good example. If I understand correctly, then it is necessary to set as a default date of July last year.

If yes, then you can use something like the one below, but for a controller I suggest moving the date argument and then a model population to include on the July of last year:

     

sets the date up to July 1, 2013.

Groovy 2.2.0 comes with a useful utility method on the date object, but it can not be used in Grails as the current versions of Grails using: < Pre> import static java.util.Calendar. * DEF today = new date () DEF lastYearJuly = today.copyWith (Year: Today [YEAR] - 1, Month: July)

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -