Opened 12 years ago

Closed 12 years ago

#6002 closed defect (fixed)

[cla][patch][test] Changing constraints on DateTimeBox more than once doesn't always work

Reported by: nathan Owned by: Douglas Hays
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

(kind of related to bug #5610)

The calendar caches it's "disabled" set of dates - so changing constraints after the popup has already been displayed once will not result in a new set of constraints. The constraints are honored - but the visible set of "disabled" dates is not updated.

Attached is a patch to dijit.form._DateTimeTestBox to force a redraw of the calendar if the popup has already been displayed and the constraints have been changed. A test case is also applied to test_DateTextBox that adds a "To/From?" pair of date boxes.

Attachments (2)

DateTimeTextBox_ChangeConstraint.patch (2.1 KB) - added by guest 12 years ago.
Patch by Nathan Toone to allow for dynamic changing of constraints
DateTimeTextBox_ChangeConstraint.2.patch (1.5 KB) - added by nathan 12 years ago.
Updated patch to destroy the calendar widget on blur - rather than hacking around it...no noticable performance difference in IE6

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by guest

Patch by Nathan Toone to allow for dynamic changing of constraints

comment:1 Changed 12 years ago by nathan

Cc: nathan added; nathan@… removed

comment:2 Changed 12 years ago by nathan

Cc: nathan removed
Reporter: changed from guest to nathan

Changed 12 years ago by nathan

Updated patch to destroy the calendar widget on blur - rather than hacking around it...no noticable performance difference in IE6

comment:3 Changed 12 years ago by bill

Milestone: 1.1
Owner: set to Douglas Hays

Looks good to me; keeping around the drop down seems like a premature optimization (that leads to problems like this).

comment:4 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [12736]) Fixes #6002 !strict. Proxy commit for nathan. Destroy popup on blur so that changed constraints are reprocessed. Add to/from datetextbox example.

Note: See TracTickets for help on using tickets.