Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1161 closed defect (fixed)

DatePicker property gets set after fillInTemplate but needed before

Reported by: [email protected] Owned by: dylan
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: [email protected]…, [email protected]
Blocked By: Blocking:


DropdownDatePicker? is trying to pass the input date when creating the DatePicker? widget. (Lines 31 to 35 in test_DropdownDatePIcker.html) But when the test page is displayed (test_DropdownDatePicker.html), only today's date is selected as the current date when the calendar icon is clicked.

To correct this, DatePicker? needs to allow the 'storedDate' to be taken out of the 'initializer' function call and defined within the function definition of dojo.widget.defineWidget call. The attached patch will apply the change.

Attachments (1)

DatePickerjs.patch (681 bytes) - added by [email protected] 15 years ago.
Patch for DatePicker?.js

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by [email protected]

Attachment: DatePickerjs.patch added

Patch for DatePicker?.js

comment:1 Changed 15 years ago by dylan

Milestone: 0.4
Owner: changed from anonymous to dylan
Status: newassigned

comment:2 Changed 15 years ago by dylan

Component: GeneralWidgets
Owner: changed from dylan to sjmiles
Priority: normalhigh
severity: normalmajor
Status: assignednew

actually, while this patch works, it's not the reason for the ticket... in fact, the patch would fail if you have two date pickers instances in a page.

The real issue here is that storeddate is getting set instead of storedDate , which is a much more critical issue I believe.

sjmiles, can you take a peak?

comment:3 Changed 15 years ago by dylan

Summary: DatePicker not allowing initialization parameter for 'storedDate'initializer appears to be doing a toLowerCase operation on property names

comment:4 Changed 15 years ago by dylan

Owner: changed from sjmiles to dylan
Status: newassigned
Summary: initializer appears to be doing a toLowerCase operation on property namesDatePicker property gets set after fillInTemplate but needed before

actually, the issue here is that initializer is called after fillInTemplate if I remember the widget lifecycle correctly, which explains why the proposed patch works...

comment:5 Changed 15 years ago by [email protected]

Cc: [email protected] added

I have tested this with 2 DatePickers? 1 passed storedDate="2006-12-25" and one passed storedDate="2003-01-01" and it worked just fine... I implemented this patch (before I found this ticket) after talking to Peller about DropDownDatePicker? not working... on a page with 17 DatePickers? both storedDate ones rendered perfectly... with DropDownDatePicker? each one open to the respective date in its inputNode....

If this covers the problemm ticket# 1386 will also close this one.


comment:6 Changed 15 years ago by Adam Peller

Cc: [email protected] added

comment:7 Changed 15 years ago by dylan

Resolution: fixed
Status: assignedclosed

Resolved in [5566]

comment:8 Changed 14 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.