1

I would like to know what is the prefered way to handle hour-minute input fields in JSF.

I am using JSF2.2 with primefaces 5.2

I would like to have one input field for hours and one for minutes and have the value saved to dabase in decimal and fraction format.

Then it would be nice alo so have a converter for this, for example if you have the need to store in minute or second precision. Is there already something availabe or do I realy have to write one of my own?

simonC
  • 4,101
  • 10
  • 50
  • 78
  • how about p:calendar and store db as timestamp or date columns – vels4j Jul 30 '15 at 10:42
  • It is just another field, any difference for them being time fields is an GUI decission (dropdown vs input text vs slider). – SJuan76 Jul 30 '15 at 10:44
  • I don't want a timestamp/date saved in database, I wont the time 1h 30min saved as 1,50 in database – simonC Jul 30 '15 at 10:44
  • @SJuan76 I know it is just another field but I woul like to have such a component already available if there is any instead of program one of my own – simonC Jul 30 '15 at 10:46
  • Is this acceptable as dupe? http://stackoverflow.com/questions/17235721/split-java-util-date-over-two-hinputtext-fields-representing-hour-and-minute-wi/ It only saves it as `java.util.Date`, but it should be possible to manipulate it to save as `java.lang.String` or whatever property type you want. – BalusC Jul 30 '15 at 10:53

0 Answers0