#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)
Change History (7)
Changed 14 years ago by
Attachment: | datepicker_class_fix.js added |
---|
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
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 14 years ago by
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:4 Changed 14 years ago by
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 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
here's how to set class name properties without patching the widget:
<span dojoType="DatePicker" classNames="previous:thingerPreviousMonth;current:thingerCurrentMonth;" ...> ... </span>
Marking "invalid"
adds classPrefix similiar to validationTextbox to allow custom classNames ot be used