Opened 15 years ago

Closed 14 years ago

Last modified 10 years ago

#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)

example.js (1.1 KB) - added by wdbaker54 15 years ago.
I have tried to strip out everything non-essential - including any ajax and replacing it with a hard-coded array.

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by wdbaker54

Attachment: example.js added

I have tried to strip out everything non-essential - including any ajax and replacing it with a hard-coded array.

comment:1 Changed 14 years ago by kbwood

Resolution: wontfix
Status: newclosed

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'))

return [false, events[i][2], events[i][3]];

else

return [true, events[i][2], events[i][3]];

or even just:

return [!events[i][2].match('holiday'), events[i][2], events[i][3]];

comment:2 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.