aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/datepicker.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets/datepicker.js')
-rw-r--r--ui/widgets/datepicker.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js
index 7dbcf3de7..9ca29a0db 100644
--- a/ui/widgets/datepicker.js
+++ b/ui/widgets/datepicker.js
@@ -1080,7 +1080,7 @@ $.extend( Datepicker.prototype, {
}
inst = this._getInst( target[ 0 ] );
- inst.selectedDay = inst.currentDay = $( "a", td ).html();
+ inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
inst.selectedMonth = inst.currentMonth = month;
inst.selectedYear = inst.currentYear = year;
this._selectDate( id, this._formatDate( inst,
@@ -1932,6 +1932,7 @@ $.extend( Datepicker.prototype, {
( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
+ "' data-date='" + printDate.getDate() + // store date as data
"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
printDate.setDate( printDate.getDate() + 1 );
printDate = this._daylightSavingAdjust( printDate );