Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object date extends MappedDate(this) {
- override def toForm = {
- val year = Date.Today.getYear
- val month = Date.Today.getMonth
- val day = Date.Today.getDay
- val y = SHtml.select((year - 1) to (year + 1) map (i => (i toString, i toString)),
- Full(year.toString), {in: String => apply(Date(i_is_!, in.toInt, -1, -1).getDate)})
- val m = SHtml.select(1 to 12 map (i => (i toString, i toString)),
- Full(month.toString), {in: String => apply(Date(i_is_!, -1, in.toInt, -1).getDate)})
- val d = SHtml.select(1 to 31 map (i => (i toString, i toString)),
- Full(day.toString), {in: String => apply(Date(i_is_!, -1, -1, in.toInt).getDate)})
- Full(<div>{y}{m}{d}</div>)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement