Opened 13 years ago
Closed 13 years ago
#9873 closed defect (invalid)
dojo.date not formatting dijit._Calendar value correctly
Reported by: | steven3311 | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | General | Version: | 1.3.2 |
Keywords: | Calendar, dijit._Calendar, dojo.date, date, format | Cc: | |
Blocked By: | Blocking: |
Description
When you get the value from a dijit._Calendar and attempt to reformat it via "dojo.date.locale.format" the result is missing the month value. Here is an example:
//calendar object var dateVal = dijit.byId("cal_"+this.id).attr("value"); var newDate =dojo.date.locale.format(new Date(dateVal), {selector:'date',datePattern:"mm/dd/yyyy"}); //newDate is equals 00/11/2009
Change History (2)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
look closely at the spec referenced by the inline docs. The format string uses Java conventions,and I think month is a capital "M". I think lowercase "m" is minutes.
Note: See
TracTickets for help on using
tickets.
Fixed my problem by removing the "datePattern" option.
updated code:
You can close this ticket. Thanks