Calendar Plugin

Plugin Incompatible w/Grails Lists

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Blocker 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>

Activity

Hide
bubbles.way added a comment -

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

Show
bubbles.way added a comment - 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
Hide
Ludek Dolejsky added a comment -

Hi,

also had this problem. Managed to fix by small change to CalendarTagLib.groovy (see attached).

Show
Ludek Dolejsky added a comment - Hi, also had this problem. Managed to fix by small change to CalendarTagLib.groovy (see attached).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: