Vra

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 dit nuttig?

Oplossing

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.

Ander wenke

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.

Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top