Menu

#2 Time set to 0 when using setDateFormat()

v1.1
closed-fixed
JCalendar (2)
5
2005-05-11
2005-04-15
No

Creating a JCalendarCombo displaying both date and
time, and then changing the default date format with a
setDateFormat call, renders the time unusable on the
GUI, because it gets automatically set to 0 on every
click on the JCalendar control.

Discussion

  • Lucio Crusca

    Lucio Crusca - 2005-04-15

    Example of the bug.

     
  • Antonio Freixas

    Antonio Freixas - 2005-04-15
    • assigned_to: nobody --> freixas
     
  • Antonio Freixas

    Antonio Freixas - 2005-05-11

    Logged In: YES
    user_id=904426

    The problem is fixed in release FLib 1.1.1 (to be released
    soon).

    The problem occurred because the method used to date/time
    changes in the GUI did not use the newly supplied date
    format. The fix is to try to parse GUI changes with the
    current date Format (as well as some other formats).

    Some comments on the sample program:

    * The date format you set breaks localization. If this is
    not important for you, fine.

    * The date format is used for the display in the combo box
    text field. You may want to also set the format used to
    display the time in the spinner box of the pop-up calendar
    so that it matches. Check out the constructor signatures.

    * Yes, I know it's a test program. Thanks for including it.
    I'm pointing out a few things in case you are not aware of
    them. If you are, ignore my help.

     
  • Antonio Freixas

    Antonio Freixas - 2005-05-11
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.