Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1161 closed defect (fixed)

DatePicker property gets set after fillInTemplate but needed before

Reported by: kleite@… Owned by: dylan
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: ktiedt@…, adam@…
Blocked By: Blocking:

Description

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 kleite@… 13 years ago.
Patch for DatePicker?.js

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by kleite@…

Attachment: DatePickerjs.patch added

Patch for DatePicker?.js

comment:1 Changed 13 years ago by dylan

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

comment:2 Changed 13 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 13 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 13 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 13 years ago by ktiedt@…

Cc: ktiedt@… 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.

-Karl

comment:6 Changed 13 years ago by Adam Peller

Cc: adam@… added

comment:7 Changed 13 years ago by dylan

Resolution: fixed
Status: assignedclosed

Resolved in [5566]

comment:8 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.