I’m extending the datepicker in my code by resetting the _generateHTML function in beforeShow, i.e. $.datepicker._generateHTML = function(a) { .. }
This way I can do whatever I want to the buttons on the buttonpanel. Here’s my example code: http://jsfiddle.net/benno_007/UjFEm/1/.
Sometimes the datepicker will work (i.e. click a date), sometimes it won’t. This is because it takes > 1ms for my datepicker to generate, and as a result, the uuid is out by a millisecond. window["DP_jQuery_" + z] is initially set as ‘z’ and ‘z’ is what it used throughout the datepicker plugin for the onclick of the buttons. BUT, at the end of the plugin code, it sets $.datepicker.uuid = new Date().getTime(); and because I extend the function, I have to get the $.datepicker.uuid to replace my DP_jQuery{time}.. but because it took so long to generate, its 1ms off, and then I can’t do anything with the datepicker.
I’m going to fix this by replacing d.datepicker.uuid=(new Date).getTime() with d.datepicker.uuid=z in my local plugin code, but my real question is:
Is this a bug in jQueryUI’s datepicker, or is it by design?
According to WTK, it’s by design (not a bug).
Just thought I’d close this post.