#11958 closed defect (fixed)
dijit.form.DateTextBox displayed error with 'yy' pattern and fullYear:false
Reported by: | JamesTung | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.6.1 |
Component: | Date | Version: | 1.5 |
Keywords: | Cc: | bill, Douglas Hays | |
Blocked By: | Blocking: |
Description
I use the dijit.form.DateTextBox? component with the following code :
<script type="text/javascript"> dojo.require("dijit.form.DateTextBox"); function setShortYear() { var w = dijit.byId('shortYear'); w.constraints.fullYear = false; w.attr('value', new Date()); //set value is TODAY } dojo.addOnLoad(setShortYear); </script> <input id="shortYear" type="text" name="shortYear" dojoType="dijit.form.DateTextBox" constraints={datePattern:'MMddyy'} required="true" />
I set pattern to 'MMddyy' and value is TODAY(ex: 11/19/2010). The displayed string in field is correct(111910), but the calendar is wrong(become 01/11/910). The year look like 3 digit.
Attachments (2)
Change History (20)
Changed 10 years ago by
Attachment: | testDate.html added |
---|
comment:1 Changed 10 years ago by
Component: | General → Date |
---|---|
Owner: | changed from anonymous to Adam Peller |
Status: | new → assigned |
comment:2 Changed 10 years ago by
I think this problem maybe made the calendar can't select the dates of AD 99 and before. dojo.date.locale.parse("01/01/0099", {fullyear:true, datePattern:"MM/dd/yyyy",selector:"date"}) Fri Jan 1 00:00:00 UTC+0800 1999
comment:4 Changed 10 years ago by
This bug is causing major issues for my team. It means the dateTextBox cannot be supported in our product. I believe even the samples on dojotoolkit.org won't all work because of this bug.
comment:5 Changed 10 years ago by
@FrugalGuy?, I thought this issue was limited to this special case of a date pattern with no separators? Support for dates < 100AD is only supported with strict:true, according to the docs. If there are other cases that don't work, including samples on dojotoolkit.org, please post specific info.
comment:6 Changed 10 years ago by
Cc: | bill Douglas Hays added |
---|
oh, and I don't believe setting the constraints that way on a widget is supported either. Should be documented as [const]?
comment:7 Changed 10 years ago by
comment:8 Changed 10 years ago by
Any plan to fix this defect? We verified with Dojo 1.6 Beta2 and the problem is still exists. We have a high priority defect in our product related to the fix of this. Can you help to update the plan for this? Thanks.
comment:9 Changed 10 years ago by
Milestone: | tbd → 1.7 |
---|
Here's a patch based on Doug's suggestion. Doug, could you please review?
Changed 10 years ago by
Attachment: | date.patch added |
---|
generate multiple digit parts of RE before those with optional leading zero's
comment:12 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 Changed 10 years ago by
Is it possible to put the fix into Dojo 1.6? Is there a technical reason it can't also be fixed in that release?
comment:14 Changed 10 years ago by
No technical reason, we just try to limit backporting to regressions and critical fixes. But it can be considered.
comment:15 Changed 10 years ago by
It is related to a high priority defect in our product, it would be better for us to get it fix in Dojo 1.6 if possible.
comment:16 follow-up: 17 Changed 10 years ago by
@bruceke, please contact me at peller at dojotoolkit dot org
Sat Jan 11 0910 00:00:00 GMT-0500 (EST) {}