In some cases it is much better to use CSS to set datepicker's z-index than calculate it basing on input's parents z-index.
For example, one page has a header with date inputs (with no z-index and no need to set position style) and other controls located below which have z-index set. For previous versions of the control it was easy to handle this issue just by writing one line in CSS file:
.ui-datepicker { z-index:1000; }
Proposed solution is to add two lines to the source code:
var ignoreZIndex = $.datepicker._get(inst, 'ignoreZIndex');
if (ignoreZIndex)
inst.dpDiv.zIndex($(input).zIndex()+1);
This will improve datepicker's flexibility.