diff --git a/ui/datepicker.js b/ui/datepicker.js index 155bbc61929..8dcaa077eca 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -227,7 +227,9 @@ $.extend(Datepicker.prototype, { inst.append.remove(); } if (appendText) { - inst.append = $("" + appendText + ""); + inst.append = $("") + .addClass(this._appendClass) + .text(appendText); input[isRTL ? "before" : "after"](inst.append); } @@ -244,12 +246,32 @@ $.extend(Datepicker.prototype, { if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked buttonText = this._get(inst, "buttonText"); buttonImage = this._get(inst, "buttonImage"); - inst.trigger = $(this._get(inst, "buttonImageOnly") ? - $("").addClass(this._triggerClass). - attr({ src: buttonImage, alt: buttonText, title: buttonText }) : - $("").addClass(this._triggerClass). - html(!buttonImage ? buttonText : $("").attr( - { src:buttonImage, alt:buttonText, title:buttonText }))); + + if (this._get(inst, "buttonImageOnly")) { + inst.trigger = $("") + .addClass(this._triggerClass) + .attr({ + src: buttonImage, + alt: buttonText, + title: buttonText + }); + } else { + inst.trigger = $("" : ""); - - buttonPanel = (showButtonPanel) ? "
" + (isRTL ? controls : "") + - (this._isInRange(inst, gotoDate) ? "" : "") + (isRTL ? "" : controls) + "
" : ""; + controls = ""; + if (!inst.inline) { + controls = $("