Skip to content

Commit b58cd30

Browse files
authored
Merge branch 'jquery:main' into master
2 parents 46c2dc6 + cf938e2 commit b58cd30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/widgets/datepicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ $.extend( Datepicker.prototype, {
10801080
}
10811081

10821082
inst = this._getInst( target[ 0 ] );
1083-
inst.selectedDay = inst.currentDay = $( "a", td ).html();
1083+
inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
10841084
inst.selectedMonth = inst.currentMonth = month;
10851085
inst.selectedYear = inst.currentYear = year;
10861086
this._selectDate( id, this._formatDate( inst,
@@ -1932,6 +1932,7 @@ $.extend( Datepicker.prototype, {
19321932
( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
19331933
( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
19341934
"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
1935+
"' data-date='" + printDate.getDate() + // store date as data
19351936
"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
19361937
printDate.setDate( printDate.getDate() + 1 );
19371938
printDate = this._daylightSavingAdjust( printDate );

0 commit comments

Comments
 (0)