Question

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!

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top