Skip to content

Commit

Permalink
datepicker: #4003 - Inline datepicker and button panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ca-Phun Ung committed Jan 31, 2009
1 parent b388e6b commit 658a0f7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ui/ui.datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ $.extend(Datepicker.prototype, {
var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
currentText = (!navigationAsDateFormat ? currentText :
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
var controls = '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>';
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
Expand Down Expand Up @@ -1405,8 +1405,7 @@ $.extend(Datepicker.prototype, {
}
html += group;
}
html += (!inst.inline ? buttonPanel : '') +
($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
inst._keyEvent = false;
return html;
Expand Down

0 comments on commit 658a0f7

Please sign in to comment.