How do I get the year drop down with a textfield
Posted
by
Sanjib Karmakar
on Stack Overflow
See other posts from Stack Overflow
or by Sanjib Karmakar
Published on 2012-06-07T10:27:19Z
Indexed on
2012/06/07
10:41 UTC
Read the original article
Hit count: 213
I am creating a domain class named HOLIDAY in grails.I need to have a year dropdown in my Holiday year field. Hear is my domain:-
class Holiday extends CategoryMaster {
String holidayName
Date startDate
int year
Date dateCreated
static constraints = {
holidayName(blank:false,nullable:false)
}
}
I need to a year dropdown in year field, Should it come dynamically from a domain method that will discard the month & day and reflect only year in that dropdown adding +50 -50 to that?... How can I get it?
© Stack Overflow or respective owner