Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: Grails-Calendar 1.1.1
-
Fix Version/s: Grails-Calendar 1.2.0
-
Component/s: None
-
Labels:None
Description
The calendar plugin tag cannot be used on a page where the date is in a list of domain objects hanging off the main domain object. Javascript errors will occur.
Author {
String name
List books
static hasMany = [books: Book]
}
Book {
String name
Date pubDate = new Date()
Author author
static belongsTo = Author
}
In the gsp you will find that the default grails date picker works fine, but the calendar:datePicker gives javascript errors:
<g:each in="${authorInstance.books}" var="book" status="idx">
<g:datePicker name="books[${idx}].pubDate" value="${book?.pubDate}"></g:datePicker>
<calendar:datePicker name="books[${idx}].pubDate" value="${book?.pubDate}"/>
</g:each>
I have written description how to integrate (js)calendar with g:datePicker gsp tag. I think it would make sense to integrate this functionality in the calendar plugin (new custom tag that connects g:datePicker with calendar).
See:
http://it-bubbles.blogspot.com/2009/03/enhace-grails-gdatepicker-with.html