@@ -236,8 +236,9 @@ define([
236
236
buttonPanel = showButtonPanel ?
237
237
'<div class="ui-datepicker-buttonpane ui-widget-content">' + ( isRTL ? controls : '' ) +
238
238
( this . _isInRange ( inst , gotoDate ) ? '<button type="button" class="ui-datepicker-current ' +
239
- 'ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
240
- '>' + currentText + '</button>' : '' ) + ( isRTL ? '' : controls ) + '</div>' : '' ;
239
+ 'ui-state-default ui-priority-secondary ui-corner-all"'
240
+ + ' data-handler="today" data-event="click"' + '>' + currentText + '</button>' : '' ) +
241
+ ( isRTL ? '' : controls ) + '</div>' : '' ;
241
242
firstDay = parseInt ( this . _get ( inst , 'firstDay' ) , 10 ) ;
242
243
firstDay = isNaN ( firstDay ) ? 0 : firstDay ;
243
244
@@ -254,19 +255,18 @@ define([
254
255
255
256
if ( numMonths [ 1 ] > 1 ) {
256
257
switch ( col ) {
257
- case 0 :
258
- calender += ' ui-datepicker-group-first' ;
259
- cornerClass = ' ui-corner-' + ( isRTL ? 'right' : 'left' ) ;
260
- break ;
261
-
262
- case numMonths [ 1 ] - 1 :
263
- calender += ' ui-datepicker-group-last' ;
264
- cornerClass = ' ui-corner-' + ( isRTL ? 'left' : 'right' ) ;
265
- break ;
266
-
267
- default :
268
- calender += ' ui-datepicker-group-middle' ;
269
- cornerClass = '' ;
258
+ case 0 :
259
+ calender += ' ui-datepicker-group-first' ;
260
+ cornerClass = ' ui-corner-' + ( isRTL ? 'right' : 'left' ) ;
261
+ break ;
262
+ case numMonths [ 1 ] - 1 :
263
+ calender += ' ui-datepicker-group-last' ;
264
+ cornerClass = ' ui-corner-' + ( isRTL ? 'left' : 'right' ) ;
265
+ break ;
266
+ default :
267
+ calender += ' ui-datepicker-group-middle' ;
268
+ cornerClass = '' ;
269
+ break ;
270
270
}
271
271
}
272
272
calender += '">' ;
@@ -284,8 +284,8 @@ define([
284
284
285
285
for ( dow = 0 ; dow < 7 ; dow ++ ) { // days of the week
286
286
day = ( dow + firstDay ) % 7 ;
287
- thead += '<th' + ( ( dow + firstDay + 6 ) % 7 >= 5 ?
288
- ' class="ui-datepicker-week-end"' : '' ) + '>' +
287
+ thead += '<th' + (
288
+ ( dow + firstDay + 6 ) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '' ) + '>' +
289
289
'<span title="' + dayNames [ day ] + '">' + dayNamesMin [ day ] + '</span></th>' ;
290
290
}
291
291
calender += thead + '</tr></thead><tbody>' ;
@@ -312,26 +312,34 @@ define([
312
312
unselectable = otherMonth && ! selectOtherMonths || ! daySettings [ 0 ] ||
313
313
minDate && printDate < minDate || maxDate && printDate > maxDate ;
314
314
tbody += '<td class="' +
315
- ( ( dow + firstDay + 6 ) % 7 >= 5 ? ' ui-datepicker-week-end' : '' ) + // highlight weekends
316
- ( otherMonth ? ' ui-datepicker-other-month' : '' ) + // highlight days from other months
315
+ // highlight weekends
316
+ ( ( dow + firstDay + 6 ) % 7 >= 5 ? ' ui-datepicker-week-end' : '' ) +
317
+ // highlight days from other months
318
+ ( otherMonth ? ' ui-datepicker-other-month' : '' ) +
317
319
( printDate . getTime ( ) === selectedDate . getTime ( ) &&
318
320
drawMonth === inst . selectedMonth && inst . _keyEvent || // user pressed key
319
321
defaultDate . getTime ( ) === printDate . getTime ( ) &&
320
322
defaultDate . getTime ( ) === selectedDate . getTime ( ) ?
321
323
// or defaultDate is current printedDate and defaultDate is selectedDate
322
324
' ' + this . _dayOverClass : '' ) + // highlight selected day
323
325
( unselectable ? ' ' + this . _unselectableClass + ' ui-state-disabled' : '' ) +
324
- ( otherMonth && ! showOtherMonths ? '' : ' ' + daySettings [ 1 ] + // highlight custom dates
325
- ( printDate . getTime ( ) === currentDate . getTime ( ) ? ' ' + this . _currentClass : '' ) +
326
- ( printDate . getDate ( ) === today . getDate ( ) && printDate . getMonth ( ) === today . getMonth ( ) &&
327
- printDate . getYear ( ) === today . getYear ( ) ? ' ui-datepicker-today' : '' ) ) + '"' +
328
- ( ( ! otherMonth || showOtherMonths ) && daySettings [ 2 ] ?
329
- ' title="' + daySettings [ 2 ] + '"' : '' ) + // cell title
326
+ // highlight custom dates
327
+ ( otherMonth && ! showOtherMonths ? '' : ' ' + daySettings [ 1 ] +
328
+ ( printDate . getTime ( ) === currentDate . getTime ( ) ?
329
+ ' ' + this . _currentClass : '' ) +
330
+ (
331
+ printDate . getDate ( ) === today . getDate ( ) &&
332
+ printDate . getMonth ( ) === today . getMonth ( ) &&
333
+ printDate . getYear ( ) === today . getYear ( ) ? ' ui-datepicker-today' : ''
334
+ )
335
+ ) + '"' + ( ( ! otherMonth || showOtherMonths ) && daySettings [ 2 ] ?
336
+ ' title="' + daySettings [ 2 ] + '"' : '' ) + // cell title
330
337
( unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' +
331
- '' + printDate . getMonth ( ) + '" data-year="' + printDate . getFullYear ( ) + '"' ) + '>' +
338
+ '' + printDate . getMonth ( ) + '" data-year="' +
339
+ printDate . getFullYear ( ) + '"' ) + '>' +
332
340
( otherMonth && ! showOtherMonths ? ' ' : // display for other months
333
- unselectable ? '<span class="ui-state-default">' + printDate . getDate ( ) + '</span>'
334
- : '<a class="ui-state-default' +
341
+ unselectable ? '<span class="ui-state-default">' + printDate . getDate ( ) +
342
+ '</span>' : '<a class="ui-state-default' +
335
343
( printDate . getTime ( ) === today . getTime ( ) ? ' ' : '' ) +
336
344
( printDate . getTime ( ) === currentDate . getTime ( ) ? ' ui-state-active' : '' ) +
337
345
( otherMonth ? ' ui-priority-secondary' : '' ) +
@@ -349,7 +357,8 @@ define([
349
357
drawYear ++ ;
350
358
}
351
359
calender += '</tbody></table>' + ( isMultiMonth ? '</div>' +
352
- ( numMonths [ 0 ] > 0 && col === numMonths [ 1 ] - 1 ? '<div class="ui-datepicker-row-break"></div>'
360
+ ( numMonths [ 0 ] > 0 && col === numMonths [ 1 ] - 1 ?
361
+ '<div class="ui-datepicker-row-break"></div>'
353
362
: '' ) : '' ) ;
354
363
group += calender ;
355
364
}
0 commit comments