Frage

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!

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top