CalendarTimeTextField: can a time format be specified?

82 views
Skip to first unread message

joseph....@gmail.com

unread,
May 14, 2013, 11:38:30 AM5/14/13
to jfxtra...@googlegroups.com
The CalendarTimeTextField provides the only JavaFX time-specific widget that I've seen (Actually it's one of the few time-specific widgets I've seen anywhere).  However, it appears to only accept time specified as HH:MM.  If seconds are added, a NumberFormatException is thrown.  There also does not appear to be any way to specify a time format (like the date format you can specify to CalendarTextField).  Is there a way (or is there a plan to support this in the future) to handle time values with formats other than HH:MM?  Thanks.

Tom

unread,
May 14, 2013, 12:30:17 PM5/14/13
to jfxtra...@googlegroups.com
Good point. There indeed is not a formatter at this time and the hh:mm is hard coded. This control was quickly build on request, it needs a little TLC.

Tom


On 2013-05-14 17:38, joseph....@gmail.com wrote:
> The CalendarTimeTextField provides the only JavaFX time-specific widget that I've seen (Actually it's one of the few time-specific widgets I've seen anywhere). However, it appears to only accept time specified as HH:MM. If seconds are added, a NumberFormatException is thrown. There also does not appear to be any way to specify a time format (like the date format you can specify to CalendarTextField). Is there a way (or is there a plan to support this in the future) to handle time values with formats other than HH:MM? Thanks.
> --
> You received this message because you are subscribed to the Google Groups "JFXtras Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jfxtras-user...@googlegroups.com.
> To post to this group, send email to jfxtra...@googlegroups.com.
> Visit this group at http://groups.google.com/group/jfxtras-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Tom

unread,
May 20, 2013, 3:06:59 AM5/20/13
to jfxtra...@googlegroups.com
I've set up CalendarTimeTextField to have the same API as CalendarTextField, with a dateFormat and dateFormats property.


On 2013-05-14 17:38, joseph....@gmail.com wrote:
> The CalendarTimeTextField provides the only JavaFX time-specific widget that I've seen (Actually it's one of the few time-specific widgets I've seen anywhere). However, it appears to only accept time specified as HH:MM. If seconds are added, a NumberFormatException is thrown. There also does not appear to be any way to specify a time format (like the date format you can specify to CalendarTextField). Is there a way (or is there a plan to support this in the future) to handle time values with formats other than HH:MM? Thanks.
Reply all
Reply to author
Forward
0 new messages