Opened 7 years ago

Last modified 3 years ago

#15282 new defect

Problem with date format ddMMMyyyy

Reported by: em31 Owned by: Adam Peller
Priority: undecided Milestone: 1.15
Component: Date Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Since Dojo 1.4.x (it is always true in the 1.7.2), when you have a datePattern:'ddMMMyyyy' in an input field

<input dojoType=dijit.form.DateTextBox name="date" id="date2" constraints="{datePattern:'ddMMMyyyy'}">

If you select a date which contains a 30 or a 31 (example 30April2012) the input is always "not valid". Because in dojo/date/locale.js in the _buildDateTimeRE function the regExp generated is not correct :

case 'M': s = (l>2) ? '\\S+?' : p2+'[1-9]|1[0-2]';
s = (l>2) ? '\\D+?' : p2+'[1-9]|1[0-2]'; is better -> \D is a non-digit character

Change History (2)

comment:1 Changed 4 years ago by dylan

Milestone: tbd1.12

comment:2 Changed 3 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.