Why does the DatePicker control accept invalid dates?
book
Article ID: KB0083653
calendar_today
Updated On:
Products
Versions
TIBCO Business Studio - BPM Edition
4.1.0
Description
The DatePicker control on a BPM form will automatically take an invalid date and "calculate" a valid date given the input. For example, an invalid date of 32/01/2017 may be entered into the control and the DatePicker will automatically retain 01/02/2017 as the input date.
Issue/Introduction
Business Studio's DatePicker control will take a date that looks invalid and calculate a valid date.
Environment
TIBCO ActiveMatrix BPM 4.1.0
Business Studio version 4.1.0.20
Resolution
The reason for this behavior is that the DatePicker control uses DateTimeFormat which internally uses java.util.Date emulation. Java Date normalizes the date this way, hence this normalization behavior. So for example, the 32nd January would always be interpreted as the 1st February.