#1161 closed defect (fixed)
DatePicker property gets set after fillInTemplate but needed before
Reported by: | Owned by: | dylan | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | [email protected]…, [email protected]… | |
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)
Change History (9)
Changed 15 years ago by
Attachment: | DatePickerjs.patch added |
---|
comment:1 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Owner: | changed from anonymous to dylan |
Status: | new → assigned |
comment:2 Changed 15 years ago by
Component: | General → Widgets |
---|---|
Owner: | changed from dylan to sjmiles |
Priority: | normal → high |
severity: | normal → major |
Status: | assigned → new |
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
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
Owner: | changed from sjmiles to dylan |
---|---|
Status: | new → assigned |
Summary: | initializer appears to be doing a toLowerCase operation on property names → DatePicker 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 14 years ago by
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.
-Karl
comment:6 Changed 14 years ago by
Cc: | [email protected]… added |
---|
Patch for DatePicker?.js