I have spent sometime analysing the power of Struts 2 and JQGrid. In a time when so many frameworks are out there, so many projects, some of which perform code generation, the question is can Struts 2 still have a place in the new world, the new era that has seen the rise of web technologies with mouth watering graphics and tantalizing visual effects?
I am happy to say that yes it can. Within the JQGrid Struts 2 is a framework that has the capability to make it through and past 2010 into the second decade of this new century that has dawned upon us.
Today I write about dates and date picking in the Struts 2 JQGrid plugin. The reason being there seems to be, to my knowledge, no clear explanation on this. In my next post I will give a full tutorial on the use of JQGrid and more comprehensive coverage on this wonderful plugin.
We want to be able to have a date picker in the Add Record screen. In the picture below confirmBy is a date field and when we click on it:
Also when we edit a record, on the Edit Record screen, we click on the date field we have:
The settings for this are as follows. First in the sjg:GridColumn we have:
Where the datePick function will be:
There we are. We have added date picking functionality in the Add Record screen and the Edit Record screen.