4. What's New

This section contains the changes made in each version of Java Date Picker.

4.1. Version 3.2 (October 12, 2004)

This new version contains improvements and bug fixes, mainly requested by customers. The highlight being the UI delegate API.

The UI delegate API lets you customize easily the look and feel of the Java Date Picker components. For instance, you can create a UI delegate that changes the title of a calendar month to use a combo box instead of a popup to display and select months.

Here is a list with all the changes:

Improvements

  • Improved the UI delegate API. This is a major improvement because it allows to create UI delegates for the Java Date Picker components easily. UI delegates can help you refine the way components look and behave. The tutorial contains a new section that explains how to use the UI delegates.

  • The year spinner from JMonth (used by JMonthView and JDatePicker) repeatedly increments or decrements the year as long as its buttons are pressed.

  • Added "JDatePicker.backgroundOnEditable" client property to JDatePicker. More details can be found here.

  • Added action event support for JDateComponents. JMonthView components will fire an action event when a selectable date is double-clicked.

  • Added new methods to JDateEditComponent (commitEdit, isEditValid, invalidEdit). See the updated tutorial section on date validation behavior.

  • Added new methods to JDateEditComponent (setAutoCenturyYear and getAutoCenturyYear). These methods are useful when a year is specified as a short one (between 0 and 99).

  • Added new methods to DateModel (isUsed, setUsed, setAutoCenturyYear and getAutoCenturyYear).

  • Added Norwegian and Swedish localizations for JMonthView. This localization refers to the texts for the Today and None buttons that cannot be retrieved from somewhere else. The component is now localized for the following languages: German, Spanish, French, Hungarian, Italian, Norwegian, Portuguese, Romanian and Swedish.

  • Demo source code files accessible from this tutorial where converted to html using java2html. This makes the code easier to read. Here is a link to such a file.

Bug Fixes

  • Fixed the components to work with the Netbeans 3.6 Form editor. This is a bug in Netbeans rather than in the Java Date Picker components. The fix is actually a workaround to allow the components to be used with Netbeans.

  • JMonth generated NPE when using Java 1.4 under certain instantiation conditions.

  • Improved date editing behavior. The caret position is now kept consistent while editing a date. When editing a date you can also type a separator char to advance the caret to the next field.

  • The months popup menu from JMonth was sometimes displayed improperly if the mouse was clicked, dragged and then released.

  • JMonth and JMonthView report correctly focusGained and focusLost events.

4.2. Version 3.1 (August 30, 2004)

In the new version, the tutorial groups together all product information (changes, installation notes, etc) to make it more accessible. Apart from this, we have added new features and fixed bugs at customers' request. Here are the changes for this new version:

New Features

  • JMonthView inherits from JMonth. The methods inherited from JMonth will act on the months aggregated by JMonthView.

  • Date selection API is simpler. Although date selection can be made using the underlying date selection model, the components must provide a set of methods that are frequently used.

    As a consequence, we have added the methods setSelectionMode and setSelectedDates to JMonth and moved the method setSelectedDate from JDateEditComponent to JDateComponent.

    Also, the methods selectDate (use setSelectedDates instead) and selectToday from JMonth were removed.

  • More customization options for a JMonth component. Added grid control operations and week days names visibility operations.

  • More customization options for the JMonthView component. Can control visibility for the JMonthView status bar which contains the Today and None buttons.

  • Added SelectTodayAction in JDateComponent

  • Removed getDowNamesFormat and getMonthNamesFormat from JMonth.

Improvements

  • Documentation is easy to use. The tutorial has become the main source of information about the Java Date Picker suite. All documents (changes, license, instructions to install, etc) have been moved here.

  • Tool tip support for JDatePicker and JDateField.

  • All the components resize correctly, especially JMonthView.

  • Foreground and background colors for JDatePicker and JDateField.

  • Demo application restructured. The demo application is entirely explained in the tutorial. Each tutorial section that explains the functionality of a component uses a certain demo part for that.

  • Duplicate messages that were generated when the same date was selected where removed.

Bug Fixes

  • Obscured calendar popup. The calendar popup used by JDatePicker was not always kept entirely visible.

  • Fixed fast scrolling for JMonthView when using Single selection Mode. If JMonthView was in Single selection mode and the mouse was dragged over the trailing dates, the selected date would change very fast, too fast for a user to follow it.

  • Fixed JBuilder palette problem. JBuilder failed to add JMonthView and JDatePicker when working in Design mode.

  • Fixed memory leak in JDatePicker.

4.3. Version 3.0 (June 18, 2004)

This is the first major version since initial release. It adds a new component, JDateField and defines the framework for future date components.

The Javadoc has been rethought to be the complete document a programmer would ever need to work with Java Date Picker date components. Every package has a detailed description of how its classes relate and how they can be used. The tutorial has also been improved and is meant as a light introduction to the API. Apart from all these, some small enhancements and bug fixes have been made.

The API has been modified in a few places to accommodate new changes and to provide a base for further development. If your application does not compile anymore, see migration list from below for more help.

Migration

  • For JDatePicker, the methods setPopupVisible and isPopupVisible have been renamed to setCalendarVisible and isCalendarVisible to be consistent with the other calendar methods.

  • For JDatePicker, change listeners are not accepted anymore. One can register a date model listener instead to be notified about date field changes. This is explained below in Listening for Changes on Date Model.

New Features

  • New JDateComponent. All date selection components are based on JDateComponent. It is also the container for standard date selection actions.

    This is explained below in Using a JDateComponent.

  • New JDateEditComponent. JDateEditComponent is the base class for all date editing components. By default, dates are edited using an internal editor that forces users to type correct dates according to a standard or custom date format.

    The component can also accept free text entries that are converted to dates using a date parser. This makes it possible to plug special parsers that can convert shortcut strings like 'today' to an appropriate date.

    This is explained below in Using a JDateEditComponent.

Improvements

  • Home & End actions. Home and end action will select the first, respectively the last selectable days in a month.

  • PopupVisible Property. In JDatePicker, the popupVisible property has been renamed to calendarVisible to be consistent with other calendar methods. So, the calendar's visibility can be controlled using the setCalendarVisible method.

Bug Fixes

  • Obscured calendar popup. The calendar popup used by JDatePicker was obscured when the component appeared near the bottom of the screen. Now, the calendar is visible no matter where the JDatePicker component is placed.

4.4. Version 2.4 (May 3, 2004)

This version brings important changes over the previous ones by adding null dates support and a new (redesigned) date editor. Some other enhancements have been made to make the components even more usable and customizable.

New Features

  • Null Dates Support. Added support for null dates (empty selection).

  • Date Renderer. The calendar's appearance can be customized with a custom renderer.

  • Today/None Texts Localization. The texts for the today and none buttons can be customized using a properties file.

  • Editor Change Listener. Change listener that will receive notifications when the date is changed by the editor.

Improvements

  • New Date Editor. The date editor has been redesigned to allow easier date input. One could simply type "01012004" to say "January 1st, 2004".

  • Easier Keyboard Navigation. Selecting a disabled date with the keyboard will select the next possible date.

  • New JMonthView keyboard shortcuts. Added DELETE and BACKSPACE to select no date.

  • JMonthView API enhancement. Added methods for the components to support easier model control (setSelectionMode, getSelectionMode).

  • Table Editor Enhancement. Create a table cell editor with a specified date picker. (JDatePicker#createTableCellEditor(datePicker)).

  • Register Custom Actions. Custom actions can be registered on the components to make them even more customizable.

4.5. Version 2.3.1 (April 15, 2004)

This is a bug fix version that eliminates the focus problems of the Swing components.

Bug Fixes

  • All the components get the focus when it is requested either by mouse or keyboard allowing for smoother navigation.

  • Look and feel is changed correctly for the table cell editor.

Improvements

  • Fixed month scrolling to mean only that. When using the JMonthView arrow buttons, the month popup menu or the year spinner, only the month is changed without any date selection.

4.6. Version 2.3 (March 25, 2004)

Migration

  • The package com.standbysoft.datepicker has been renamed to com.standbysoft.component.date which now contains generic classes and interfaces that can be used for date selection. The Swing components are contained in the sub package com.standbysoft.component.date.swing.

New Features

  • Dates can be represented and edited by JDatePicker using a custom date format (see JDatePicker#setCustomFormat()).

Improvements

  • JDatePicker can be used with any look and feel (Metal, Motif, Windows, Aqua and custom ones).

  • Improved date editor to edit time fields. Now it can be considered a date time editor also.

4.7. Version 2.2 (February 23, 2004)

Migration

  • Restrictions on the minimum allowed date and maximum allowed date have been moved from MonthModel to DateSelectionModel. This design expresses more the nature of these restrictions. See the tutorial on how to work with the new DateSelectionModel.

    The following operations have been removed from MonthModel:

    1. rollYear -> use the date selection API to select a certain date

    2. rollMonth -> use the date selection API to select a certain date

    3. getMinimumAllowed -> use DateSelectionModel#getMinimumAllowed

    4. getMaximumAllowed -> use DateSelectionModel#getMaximumAllowed

    5. isMonthInRange -> use DateSelectionModel#isDateSelectable

    The following operations have been removed from MonthModelListener and MonthModelAdapter:

    1. dateIntervalChanged -> use DateSelectionListener#disabledDatesChanged

    The following operations have been removed from JMonth:

    1. rollYear -> use the date selection API to select a certain date

    2. rollMonth -> use the date selection API to select a certain date

  • Added more methods for JDatePicker to support calendar customization. We urge you to use these methods in order to customize the date picker calendar as they allow for a cleaner code and maintenance.

    The following attributes have been added to JDatePicker:

    1. calendarDisplayToday (setCalendarDisplayToday, getCalendarDisplayToday)

    2. calendarWeekNumbersVisible (setCalendarWeekNumbersVisible, getCalendarWeekNumbersVisible)

New Features

  • Added more methods for JDatePicker to support calendar customization.

Improvements

  • Improved the date selection mechanism. Setting the minimum and maximum allowed dates is now part of the date selection model. The AbstractDateSelectionModel class has been added, it contains a basic implementation for the DateSelectionModel interface.

  • Improved the JDatePicker built-in editor. The editor acts like a masked edit control where each field of the date can be edited.

  • Improved tutorial documentation.

4.8. Version 2.1 (February 2, 2004)

New Features

  • Added an editor and two more fields (dateFormat, editable) to JDatePicker.

Improvements

  • Improved Javadoc comments.

Bug Fixes

  • JDatePicker can now be used with any Look and Feel.

4.9. Version 2.0.1 (January 21, 2004)

New Features

  • Added two more methods (setPopupVisible, isPopupVisible) to DatePickerUI and JDatePicker.

Bug Fixes

  • The popup for TableCellEditor is hidden only when a day is explicitly selected.

4.10. Version 2.0 (December 15, 2003)

Initial release.