문제

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