Login Register

Date widget is changing the value after focus is removed from field

I am using the DateTextBox widget with a defined date pattern. When you select the date from the calendar, it is displayed properly. However, as soon as you remove focus from the field, the date value in the text fields is changed. My code is below:

For example, if March 17, 2008 was selected in the calendar, you first see a value of: 17120000ZMar2008. But as soon as the fields loses focus, its value is changed to: 17120000ZJan0008. Both the month and year values were changed (Mar --> Jan, and 2008 --> 0008).

As a side note, when there is a space between the month and the day (e.g. MMM yyy), the value does not get changed.

Does anyone have any ideas as to what is going on?

sounds like a parsing bug with that pattern

please file a ticket and I'll investigate

Bug in dojo.date.locale

This is actually a bug in dojo.date.locale.

I was a tad bored tonight so I submitted a ticket (and fix) here:
http://trac.dojotoolkit.org/ticket/6242

Thanks!

That works great, thank you for submitting and fixing the ticket. Now, if you get bored again ( :) ), maybe you can throw your hat in the ring with a somewhat related issue I was having with the date text box: