Opened 12 years ago

Closed 11 years ago

#4881 closed defect (wontfix)

dijit.form.DateTextBox and 'ddMMyy' pattern

Reported by: guest Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Date Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

I'm trying to use the dijit.form.DateTextBox? component with the following code :

<input type="text" name="date" constraints="{datePattern:'ddMMyy'}" value="" dojoType="dijit.form.DateTextBox" />

When the field gets the focus the timepicker is showed correctly and when I choose a date it is displayed following the pattern 'ddMMyy'. But... when the field loses the focus al the numbers are mixed! For example, today '221007' becomes '020207' (2nd february of the year 1007 when you open the timepicker again)?!

Change History (3)

comment:1 Changed 12 years ago by bill

Milestone: 1.1
Owner: set to Adam Peller

comment:2 Changed 12 years ago by Adam Peller

Component: DijitDate

I believe this is an issue with dojo.date.locale and not really with Dijit... because we implement lenient parsing by default, the regular expression for dd and MM match single digits. A workaround to this problem is to specify "strict: true" in your "constraints" object. I'm not sure how we can fix this case by default without breaking everyone else, so I'm inclined to mark this a wontfix.

comment:3 Changed 11 years ago by Adam Peller

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.