Opened 13 years ago

Closed 13 years ago

#9873 closed defect (invalid) 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,, date, format Cc:
Blocked By: Blocking:


When you get the value from a dijit._Calendar and attempt to reformat it via "" the result is missing the month value. Here is an example:

//calendar object
var dateVal = dijit.byId("cal_""value"); 
var newDate Date(dateVal), {selector:'date',datePattern:"mm/dd/yyyy"});
//newDate is equals 00/11/2009

Change History (2)

comment:1 in reply to:  description Changed 13 years ago by steven3311

Fixed my problem by removing the "datePattern" option.

updated code:

var dateVal = dijit.byId("cal_""value");
var newDate, {selector:'date',fullYear:true});

You can close this ticket. Thanks

comment:2 Changed 13 years ago by Adam Peller

Resolution: invalid
Status: newclosed

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.