Skip to content
Permalink
Browse files

Fixed 3547. Initialise alternate field on load for inline datepicker.

  • Loading branch information...
Keith Wood
Keith Wood committed Nov 8, 2008
1 parent 4addec6 commit 3946038509d16f1fef4214312f09bac94e17a4cd
Showing with 2 additions and 1 deletion.
  1. +2 −1 ui/ui.datepicker.js
@@ -246,6 +246,7 @@ $.extend(Datepicker.prototype, {
$.data(target, PROP_NAME, inst);
this._setDate(inst, this._getDefaultDate(inst));
this._updateDatepicker(inst);
this._updateAlternate(inst);
},

/* Tidy up after displaying the date picker. */
@@ -867,7 +868,7 @@ $.extend(Datepicker.prototype, {
_updateAlternate: function(inst) {
var altField = this._get(inst, 'altField');
if (altField) { // update alternate field too
var altFormat = this._get(inst, 'altFormat');
var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
var date = this._getDate(inst);
dateStr = (isArray(date) ? (!date[0] && !date[1] ? '' :
this.formatDate(altFormat, date[0], this._getFormatConfig(inst)) +

0 comments on commit 3946038

Please sign in to comment.
You can’t perform that action at this time.