Opened 11 years ago

Closed 11 years ago

#6118 closed defect (fixed)

Missing Millisecond Padding in dojo.date.locale.formatPattern

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

Description

From Ronnie Roberts, IBM:

For a TimeTextBox?, I am using a custom format yyyy-MM-dd-HH.mm.ss.SSS . I have overridden the serialize method: return dojo.date.locale.format(object, {timePattern: this.constraints.timePattern, selector: 'time' });

The problem is that dojo.date.locale.formatPattern handles milliseconds (SSS) slightly different than other values, yielding the millisecond field to be 0 when it should be 000. This causes the pattern validation to fail. Changing the line of code (dojo.date.locale line 140): s = dateObject.getMilliseconds(); pad = true;

Yields the correct results.

Change History (1)

comment:1 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [12975]) pad milliseconds field. Fixes #6118

Note: See TracTickets for help on using tickets.