diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js index 441170c9778..41ca503db4b 100644 --- a/ui/widgets/datepicker.js +++ b/ui/widgets/datepicker.js @@ -1036,7 +1036,7 @@ $.extend( Datepicker.prototype, { } inst = this._getInst( target[ 0 ] ); - inst.selectedDay = inst.currentDay = $( "a", td ).html(); + inst.selectedDay = inst.currentDay = $( "a", td ).data( "date" ); inst.selectedMonth = inst.currentMonth = month; inst.selectedYear = inst.currentYear = year; this._selectDate( id, this._formatDate( inst, @@ -1816,7 +1816,7 @@ $.extend( Datepicker.prototype, { ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) + ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months - "' href='#'>" + printDate.getDate() + "" ) ) + ""; // display selectable date + "' href='#' data-date='" + printDate.getDate() + "'>" + printDate.getDate() + "" ) ) + ""; // display selectable date printDate.setDate( printDate.getDate() + 1 ); printDate = this._daylightSavingAdjust( printDate ); }