@@ -365,6 +365,8 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
365
365
* Selects a given date or array of dates.
366
366
* @method selectDates
367
367
* @param {Date|Array } dates A `Date` or `Array` of `Date`s.
368
+ * @return {CalendarBase } A reference to this object
369
+ * @chainable
368
370
*/
369
371
selectDates : function ( dates ) {
370
372
if ( ydate . isValidDate ( dates ) ) {
@@ -373,6 +375,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
373
375
else if ( L . isArray ( dates ) ) {
374
376
this . _addDatesToSelection ( dates ) ;
375
377
}
378
+ return this ;
376
379
} ,
377
380
378
381
/**
@@ -381,6 +384,8 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
381
384
* @method deselectDates
382
385
* @param {Date|Array } [dates] A `Date` or `Array` of `Date`s, or no
383
386
* argument if all dates should be deselected.
387
+ * @return {CalendarBase } A reference to this object
388
+ * @chainable
384
389
*/
385
390
deselectDates : function ( dates ) {
386
391
if ( ! dates ) {
@@ -392,6 +397,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
392
397
else if ( L . isArray ( dates ) ) {
393
398
this . _removeDatesFromSelection ( dates ) ;
394
399
}
400
+ return this ;
395
401
} ,
396
402
397
403
/**
@@ -618,7 +624,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
618
624
* @method _renderSelectedDates
619
625
* @private
620
626
*/
621
- _renderSelectedDates : function ( ) {
627
+ _renderSelectedDates : function ( ) {
622
628
this . get ( "contentBox" ) . all ( "." + CAL_DAY_SELECTED ) . removeClass ( CAL_DAY_SELECTED ) . setAttribute ( "aria-selected" , false ) ;
623
629
624
630
for ( var paneNum = 0 ; paneNum < this . _paneNumber ; paneNum ++ ) {
@@ -640,7 +646,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
640
646
* @return {Node } The node wrapping the DOM element of the cell the date
641
647
* corresponds to.
642
648
*/
643
- _dateToNode : function ( oDate ) {
649
+ _dateToNode : function ( oDate ) {
644
650
var day = oDate . getDate ( ) ,
645
651
col = 0 ,
646
652
daymod = day % 7 ,
@@ -713,7 +719,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
713
719
* @protected
714
720
* @return {Date } The date corresponding to the DOM element that the given node wraps.
715
721
*/
716
- _nodeToDate : function ( oNode ) {
722
+ _nodeToDate : function ( oNode ) {
717
723
718
724
var idParts = oNode . get ( "id" ) . split ( "_" ) . reverse ( ) ,
719
725
paneNum = parseInt ( idParts [ 2 ] , 10 ) ,
@@ -731,7 +737,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
731
737
* @method _bindCalendarEvents
732
738
* @protected
733
739
*/
734
- _bindCalendarEvents : function ( ) {
740
+ _bindCalendarEvents : function ( ) {
735
741
736
742
} ,
737
743
@@ -946,7 +952,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
946
952
* @method _afterHeaderRendererChange
947
953
* @private
948
954
*/
949
- _afterHeaderRendererChange : function ( ) {
955
+ _afterHeaderRendererChange : function ( ) {
950
956
var headerCell = this . get ( "contentBox" ) . one ( "." + CAL_HD_LABEL ) ;
951
957
headerCell . setContent ( this . _updateCalendarHeader ( this . get ( 'date' ) ) ) ;
952
958
} ,
@@ -968,7 +974,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
968
974
* @method _afterDateChange
969
975
* @private
970
976
*/
971
- _afterDateChange : function ( ) {
977
+ _afterDateChange : function ( ) {
972
978
973
979
var contentBox = this . get ( 'contentBox' ) ,
974
980
headerCell = contentBox . one ( "." + CAL_HD ) . one ( "." + CAL_HD_LABEL ) ,
@@ -1006,7 +1012,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
1006
1012
* element ids in the given pane.
1007
1013
* @private
1008
1014
*/
1009
- _initCalendarPane : function ( baseDate , pane_id ) {
1015
+ _initCalendarPane : function ( baseDate , pane_id ) {
1010
1016
// Initialize final output HTML string
1011
1017
var calString = '' ,
1012
1018
// Get a list of short weekdays from the internationalization package, or else use default English ones.
@@ -1113,7 +1119,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
1113
1119
* @param {Node } pane The node corresponding to the calendar pane to be rerenders.
1114
1120
* @private
1115
1121
*/
1116
- _rerenderCalendarPane : function ( newDate , pane ) {
1122
+ _rerenderCalendarPane : function ( newDate , pane ) {
1117
1123
1118
1124
// Get the first day of the week from the internationalization package, or else use Sunday as default.
1119
1125
var firstday = this . get ( 'strings.first_weekday' ) || 0 ,
@@ -1250,7 +1256,7 @@ Y.CalendarBase = Y.extend( CalendarBase, Y.Widget, {
1250
1256
* @param {Date } baseDate The date with which to initialize the calendar.
1251
1257
* @private
1252
1258
*/
1253
- _initCalendarHTML : function ( baseDate ) {
1259
+ _initCalendarHTML : function ( baseDate ) {
1254
1260
// Instantiate the partials holder
1255
1261
var partials = { } ,
1256
1262
// Counter for iterative template replacement.
0 commit comments