Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18407 closed defect (duplicate)

DateTextBox broken in dojo 1.10

Reported by: Nick Fenwick Owned by:
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.10.2
Keywords: Cc:
Blocked By: Blocking:

Description

commit f018c6 by Terence Kent in dijit/form/_TextBoxMixin seems to have broken month selection using DateTextBox? with MonthAndYearlyCalendar? popup :(

The new compare() call ends up comparing the parsed version of the selected month-and-year string e.g. '2014-08', which is a Date object like "Fri Aug 01 2014 00:00:00 GMT+0700 (ICT)", against the current value of the calendar, which is normally the current time with month and year coerced e.g. "Fri Aug 08 2014 10:29:19 GMT+0700 (ICT)" (today being 8 Dec 2014).

Fixes might be:

  • to ensure the Date object maintained by the Calendar always has its time values set to zero, or
  • perhaps to override _setValueAttr better in _DateTimeTextBox so it does not call the inherited _TextBoxMixin version (but I feel that's going to miss out on useful range validation from RangeBoundTextBox?).

I'll attach an improved test_CalendarViews.html file that demonstrates the problem.

Attachments (1)

test_CalendarViews.patch (1.1 KB) - added by Nick Fenwick 5 years ago.
Patch file for widget/tests/test_CalendarViews.html adding DateTextBox? with MonthAndYearlyCalendar?

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Nick Fenwick

Attachment: test_CalendarViews.patch added

Patch file for widget/tests/test_CalendarViews.html adding DateTextBox? with MonthAndYearlyCalendar?

comment:1 Changed 5 years ago by Nick Fenwick

Sorry, I thought we were on 1.10.2 .. turns out we're on 1.10.0 and this bug was fixed in commit d38b0bd2 in dijit, also by Terence Kent. So kudos to him, and we'll look at upgrading our version of Dojo to get that and other fixes.

This can be closed as INVALID. Thanks!

comment:2 Changed 5 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #18201.

comment:3 Changed 5 years ago by bill

Component: GeneralDijit - Form
Note: See TracTickets for help on using tickets.