According with the CustomDateEditor API for this constructor version:
public CustomDateEditor(DateFormat dateFormat,
boolean allowEmpty,
int exactDateLength)
says:
Without an "exactDateLength" specified, the "01/01/05" would get parsed to "01/01/0005".
Assuming a length of 10, 01/01/05
fails how is expected. Tested and works
But about the following:
However, even with an "exactDateLength" specified, prepended zeros in the day or month part may still allow for a shorter year part, so consider this as just one more assertion that gets you closer to the intended date format.
I don't understand the idea in a 100%. About the prepended zeros for the day or month, yes I know 0# (01-09) for a day or month. But how it could let write an invalid date yet?. Even when the exactDateLength is 10?. Because either 01/01/05
or 1/1/05
is smaller than 10
What is the exactly idea in that sentence? With an example, all would be better.