Opened 13 years ago
Closed 13 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 13 years ago by
Milestone: | → 1.1 |
---|---|
Owner: | set to Adam Peller |
comment:2 Changed 13 years ago by
Component: | Dijit → Date |
---|
comment:3 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.