Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#4864 closed defect (fixed)

DateTextBox month format accepted/ reformatted

Reported by: guest Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Date Version: 0.9
Keywords: date format, month format Cc: robynes_nest@…
Blocked By: Blocking:


If I was to spell out October instead of Oct, reverts to Jan for the month with the rest remaining the same. A more expected format is to then revert the October back t Oct, or Spet to Sep to keep your format the same across the board. Defaulting back to Jan for every one does not seem like a very logical default. Thanks

Change History (8)

comment:1 Changed 12 years ago by guest

I missed putting my email in as the reported by to be kept up to date on the changes for this ticket. Please do keep me posted on any updates for this. Thank you, robynes_nest@…

comment:2 Changed 12 years ago by Adam Peller

(In [11109]) add long dates to test case. Refs #4864

comment:3 Changed 12 years ago by Adam Peller

Milestone: 1.1

comment:4 Changed 12 years ago by tk

Cc: robynes_nest@… added

Just adding the reporters CC field for them.

Personally I dont understand what the description is saying, maybe we can get a better explanation?

comment:5 Changed 12 years ago by guest

I am creating a DateTextBox? with the following code:

<input type="text" dojoType="dijit.form.DateTextBox?" constraints="{trim:true,datePattern:'d MMM yyyy'}"/>

The widget displays the date in the text box according to the specified datePattern. However, it would be nice if the widget accepted other valid date formats in the textfield. I have a tooltip that shows the user the correct format to input, but if they choose to do otherwise it doesn't act as expected.

For instance, currently expects me to enter the date "27 Oct 2007", but if I was to enter the date in the format "27 October 2007" it would automatically default to "27 Jan 2007", which I feel is not an expected or wanted outcome. If there is anything unclear please contact me @ robynes_nest@… Thanks

comment:6 Changed 12 years ago by Adam Peller

Component: DateDijit
Owner: changed from Adam Peller to Douglas Hays

Interesting. So load test_DateTextBox and change the month name to something invalid; it will change the month to January but leave the rest of the date untouched and show a valid state. Next, change the day of the month to something invalid like '99' and you will get a warning icon. At that point, you can change the month to something invalid also, and the state does not change.

Reverting the month to January is definitely the wrong behavior (not sure why that's happening) but it seems like the consistent behavior would be to leave the user's data in place. Doug, can you take a look at this?

comment:7 Changed 11 years ago by Douglas Hays

Component: DijitDate
Owner: changed from Douglas Hays to Adam Peller
severity: minornormal
Type: enhancementdefect"Dec 30, 2007", {formatLength:'long',selector:'date'})

is returning a valid Date object with January as the month. It should return null.

comment:8 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [11901]) Updated test to explicitly check for failures with Boolean coercion - Refs #5200. Invalid month/day names on parse now return null. Thanks, Doug. Fixes #4864

Note: See TracTickets for help on using tickets.