Opened 14 years ago
Closed 14 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.
Note: See
TracTickets for help on using
tickets.
(In [12975]) pad milliseconds field. Fixes #6118