Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#1815 closed defect (fixed)

DP: datepicker classes stored in array, cant override them via markup

Reported by: tk Owned by: tk
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: Cc: bill
Blocked By: Blocking:

Description

Have to override the entire class which affects all DP's on a page unless using #id.className to override them

Attachments (1)

datepicker_class_fix.js (725 bytes) - added by tk 13 years ago.
adds classPrefix similiar to validationTextbox to allow custom classNames ot be used

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by tk

Attachment: datepicker_class_fix.js added

adds classPrefix similiar to validationTextbox to allow custom classNames ot be used

comment:1 Changed 13 years ago by tk

Status: newassigned

attached file with snippet of the fix, again, at work so cant create Diffs or test... will test at home if not done by someone else.

comment:2 Changed 13 years ago by Adam Peller

my suggestion would be to put all this in the initializer and add the prefix programmatically with a for-loop rather than duplicating for each element.

comment:3 Changed 13 years ago by tk

Sounds good.

comment:4 Changed 13 years ago by alex

so having looked at this, it's not clear that the attached patch will actually fix the problem. It's possible to set both objects and arrays via markup, but it's a bit unweidly. The patch that's been provided won't work since the "this" object won't point to the correct place. If anything, it needs to be initialized in postMixInProperties or something more appropriate in the widget lifecycle.

comment:5 Changed 13 years ago by alex

Resolution: fixed
Status: assignedclosed

here's how to set class name properties without patching the widget:

<span dojoType="DatePicker"
    classNames="previous:thingerPreviousMonth;current:thingerCurrentMonth;" ...>
...
</span>

Marking "invalid"

comment:6 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.