#3278 closed bug (wontfix)
Datepicker wipes out title strings
Reported by: | wdbaker54 | Owned by: | grabanski |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.datepicker | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I am assigning title strings to selectable date cells based on input provided by AJAX. The initial set of titles appear beautifully but as soon as I select a date through my onSelect function, nothing I seem to do allows the titles to kept - it's almost as if the onSelect mechanism trumps all future title settings. I am attaching a skeleton of what I am trying to do to give the gist of the problem. It could be that I am missing something from the docs since I am new to jquery and the UI but I have tried to be very careful in RTFM and don't see where my problem lies.
Attachments (1)
Change History (3)
Changed 15 years ago by
Attachment: | example.js added |
---|
comment:1 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The datepicker content is regenerated after each action (moving months, picking dates, etc) so anything you added in setTitle is lost. However, datepicker has been upgraded to handle this situation. You can provide a third entry in the array returned by beforeShowDay that becomes the cell's title. So your code would be as shown below, with no need for the setTitle function:
if (events[i][2].match('holiday'))
else
or even just:
return [!events[i][2].match('holiday'), events[i][2], events[i][3]];
I have tried to strip out everything non-essential - including any ajax and replacing it with a hard-coded array.