Вопрос

I have domain class that uses

  Date StartTime
  Date endTime 

E.g 9:00:00 , 15:00:00

What do i use in grails for just timePicker and not have dates.

Thanks!

Это было полезно?

Решение

There's no such thing out of the box in Grails.

Instead you can use any JS-timepicker, like http://keith-wood.name/timeEntry.html . This one is really simple to use. Of course you have to do date parsing and formatting on your own.

Другие советы

If you can use a plugin, have a look at the Joda-Time Plugin and its documentation.

In your domain class you can do

DateTime startTime
DateTime endTime

Then in your views use the joda:dateTimePicker or joda:datePicker or joda:timePicker as guided in documentation.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top