i\'m using the jQuery UI datepicker instead of the
, which is changing the selected date in a textbox. Now I want to save this neatly back into
I have a created a simple grails custom tag to use the jQuery UI datepicker. It's characteristics are as follows:
It creates three hidden input fields dateField_day, dateField_month, dateField_year
It's responsible for populating these hidden input fields when a date has been selected from the calendar.
It's prerequisites are as follows:
The taglib code is as follows:
class JqueryDatePickerTagLib {
def jqDatePicker = {attrs, body -> def out = out def name = attrs.name def id = attrs.id ?: name
//Create date text field and supporting hidden text fields need by grails
out.println ""
out.println ""
out.println ""
out.println ""
//Code to parse selected date into hidden fields required by grails
out.println ""
} }
The gsp code is as follows:
You can find the full article at: My Blog