IBM JWL/JSF DatePicker Calendar picks wrong date if year is under 1000

Technote (troubleshooting)


Problem(Abstract)

In Rational Application Developer (RAD) 8.0.4.2 JWL/JSF DatePicker Calendar picks wrong date if year is under 1000.

Symptom

Recreate using JWL/JSF DatePicker with DateConverter and pattern "yyyy/MM/dd"

<hx:convertDateTime pattern="yyyy/MM/dd" />

Examples:

1) Type 999 and click on date selector. Calendar will show April 0999, but when
you drag the mouse down within the calendar it becomes August 9992.
April was the current month






2) Another example. Type 999/01 and click on date selector. Calendar will show January 9990, but
when you drag the mouse down within the calendar it becomes October 9990


Using DatePicker with any year under 1000 is unpredictable as to what year shows up when selecting a Month and Date.


Cause

Limitation

Environment

Microsoft Windows 7, RAD 8.0.4.2 with JWL v3_1_14.

ExampleFacesJSP.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%-- jsf:pagecode language="java" location="/src/pagecode/ExampleFacesJSP.java" --%><%-- /jsf:pagecode --%><%@page
language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<head>
<title>MyFacesJSP</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" title="Style"
href="theme/stylesheet.css">
</head>
<f:view>
<body><hx:scriptCollector id="scriptCollector1">
<h:form styleClass="form" id="form1">
<table border="1">
<tbody>
<tr>
<td>Date Picker:</td>
<td><h:inputText styleClass="inputText" id="text1">
<hx:convertDateTime pattern="yyyy/MM/dd" />
<hx:inputHelperDatePicker id="datePicker1" />
</h:inputText></td>
</tr>
</tbody>
</table>
</h:form>
</hx:scriptCollector></body>
</f:view>
</html>


Resolving the problem

This is a limitation of the component.
There have not been practical business reasons to support dates with the year less than 1000.

Users can submit a product enhancement/feature request (RFE) using:
IBM RFE Community

Related information

RAD 85 IC - DatePicker
RAD 80 IC - DatePicker

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Application Developer for WebSphere Software
Web Development

Software version:

7.5, 7.5.1, 7.5.2, 7.5.3, 7.5.4, 7.5.5, 7.5.5.1, 7.5.5.2, 7.5.5.3, 7.5.5.4, 7.5.5.5, 8.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.4.1, 8.0.4.2, 8.5, 8.5.1

Operating system(s):

Windows

Reference #:

1634808

Modified date:

2013-05-06

Translate my page

Machine Translation

Content navigation