Ignore:
Timestamp:
Oct 21, 2009, 6:37:37 PM (15 years ago)
Author:
gav
Message:

Update templates to Grails-1.1.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/scaffolding/renderEditor.template

    r128 r158  
    141141
    142142    private renderDateEditor(domainClass,property) {
     143        def precision = property.type == java.sql.Date ? 'day' : 'minute';
    143144        if(!cp) {
    144             return "<g:datePicker name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\"></g:datePicker>"
     145            return "<g:datePicker name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" precision=\"${precision}\"></g:datePicker>"
    145146        }
    146147        else {
     
    155156                    buf << "${k}=\"${v}\" "
    156157                }
    157                 buf << "name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" ${renderNoSelection(property)}></g:datePicker>"
     158                buf << "name=\"${property.name}\" value=\"\${${domainInstance}?.${property.name}}\" precision=\"${precision}\" ${renderNoSelection(property)}></g:datePicker>"
    158159                return buf.toString()
    159160            }
Note: See TracChangeset for help on using the changeset viewer.