Hi all, I am glad to announce the 1.1.0 version of Calendar plugin.
Changes in this version includes:
- Support autobindig to date properties.
- Allow use of custom themes.
- Allow specify the year range.
- Allow to define a default value if value if null.
- Delete date when “delete or backspace is pressed in text field.
You can see the change log for 1.1.0 here..
To install plugin, just type in application root:
grails install-plugin calendar
Use of plugin has not changed, you need to import the resources with “resources tag”, and you can select theme, language, and a new property called ‘style’ was included, to allow use of custom themes.
Using a default theme:
<calendar:resources lang=”en” theme=”aqua”>
Using a custom theme:
<calendar:resources style=”${createLinkTo(dir:’css’,file:’custom-calendar.css’)}”>
You can see all themes, and how create custom themes in wiki page.
After import resources, you are ready to use date picker, just include date picker tag in you view.
<<calendar:datePicker dateFormat=”%m/%d/%Y”>
There are two new options available in date picker, defaultValue and years.
- defaultValue: allow to use a default value, if the current date is null in object.
- years: defines a range of years, available to select in date picker.
So is this! For further information about use of plugin take a look in grails wiki page.
You also can download a simple demo here, just unzip and type grails run-app to see date picker in action.
Thanks,
Maxwell.
1 Comment so far
Leave a comment
Hi,
Comment by srinath April 8, 2010 @ 09:52I was using this plugin in grails portlet and working good in view.gsp(default page). Now when i shifted code to new template (_new_form.gsp) and updating page with new Ajax.updater , the calendar was not working. Is it the plugin will not work in partials/templates