WebRunnerTM DatePicker Bean 1.0 

If you are developing JavaTM applications, applets, or composite JavaBeansTM, Taligent's WebRunner Beans can help you become productive very quickly. These Beans are part of the WebRunner Toolkit, which also includes other sets of starter beans and and tools for creating and working with JavaBeans. This package includes the DatePicker Bean version 1.0. 

The DatePicker Bean is a simple reliable component for date entry and display.  The date is set by typing a date string into a date entry field or by selecting a date from an optionally displayed monthly calendar.  The calendar may be scrolled by month or by year.  When the calendar is displayed, a date is selected by clicking the desired date on the calendar which then causes the calendar to be dismissed. 

Dates are entered or retrieved as string objects using a client specified date format which defaults to the system default format for the default locale. The format of the date in the string can be changed by setting the date format string property.  Clients may also synchronize on date changes by registering as listeners for date changed events. 

The Date Picker is supplied as part of the WebRunner Toolkit. It can be used with the WebRunner Bean Tester or any Java builder. 

Date Conversion Behavior

The DatePicker uses the Java date/time/formatter classes to convert two digit years to four digit years. Some early releases of the Java date/time/formatter classes do not perform this operation correctly which is reflected as a conversion error in the behavior of the DatePicker bean.  The main problem area has to do with the format string, i.e. M/dd/yy, and what Java will do with such strings in various releases.

Prior to 1.1.4, with a format string such as M/dd/yy (12/30/97), entering a date such as December 31, 1997 as 12/31/1997 will yield 12/31/19, or December 31, 1919. This is a bug in the formatter class reported as fixed in JDK 1.1.4. In JDK 1.1.4, 12/31/1997 will correctly yield 12/31/97, but the date will be December 31, xx97 - where the century is not correct.

We urge the use of the DatePicker with four digit year formats.

DateFormatString Format

Date format strings and their usage are documented in the java class, java.text.SimpleDateFormat.  Please refer to that documentation for information regarding correct syntax for setting the DateFormatString in the DatePicker.  As an example of correct DateFormatStrings, consider the date March 17, 2003.  The table below shows this date displayed using several DateFormatStrings examples.

M/dd/yyyy ... yields... 3/17/2003

d-MMM-yyyy ... yields... 17-Mar-2003

d-MM-yyyy ... yields... 17-03-2003

For complete information, refer to the Documentation. Updates to the documentation will periodically be available at the Taligent website
 

Installation Instructions

For installation of the Bean on Windows platforms: 
  • WebRunner Bean Installation for JDK 1.1.1 
    1. Unzip the file dpkr100.zip (or dpkr100e.zip for evaluation product) to a local directory of your choice. 
    2. Import the DatePicker.jar file that is packaged in the dpkr100(e).zip
    3. The documentation for the bean is provided in the ZIP file. 
  • WebRunner Bean Installation for use with VisualAge for Java Version 1.0 
    1. Unzip the file dpkr100.zip (or dpkr100e.zip for evaluation product) to a local directory of your choice. 
    2. Import the extracted files into VisualAge for Java
      1. Launch the VisualAge for Java Integrated Development Environment. 
      2. From the File menu, choose the Import menu item. 
      3. A SmartGuide Import dialog box appears. 
      4. Type in a new Project name, or browse and select an existing Project name where you want the Bean to be added. 
      5. Click on the JAR file option then click on the Next button. 
      6. Click on the Browse button, browse to the directory where you extracted the files from the dpkr100(e).zip file and choose the file DatePicker.jar
      7. Select the JAR files which now show up in the list of JAR files in the Smart Guide dialog, and click on the Finish button to import them into VisualAge for Java. 
      8. Back in the Workbench of VisualAge for Java, you should now see the complete set of classes under the Project name that you had specified during the Import process. 

    3. The documentation for the bean is provided in the ZIP file. 

Supported Platforms

The current release of this WebRunner Bean has been tested for use with the JDK1.1.1 available on WindowsNT and Windows95. Releases on other platforms will be supported in the near future, depending on the availability of stable releases of the JDK1.1.1 on those platforms. 
 
© Copyright Taligent, Inc. 1997. 
© Copyright IBM Corp. 1997 
All rights reserved.  
Taligent and the Taligent logo are registered trademarks of Taligent, Inc. 
IBM and VisualAge are registered trademarks of IBM Corporation. 
Other trademarks and service marks are the property of their respective owners.