@@ -115,7 +115,7 @@ var __meta__ = { // jshint ignore:line
115115 }
116116 if ( that . _view . name != "month" || options . selectable == "single" ) {
117117 that . _click ( $ ( link ) ) ;
118- }
118+ }
119119 } )
120120 . on ( "mouseup" + ns , "table.k-content, .k-footer" , function ( ) {
121121 that . _focusView ( that . options . focusOnNav !== false ) ;
@@ -129,10 +129,10 @@ var __meta__ = { // jshint ignore:line
129129 if ( that . _isMultipleSelection ( ) && that . options . weekNumber ) {
130130 element . on ( CLICK , WEEKCOLUMNSELECTOR , function ( e ) {
131131 var first = $ ( e . currentTarget ) . closest ( "tr" ) . find ( CELLSELECTORVALID ) . first ( ) ,
132- last = that . selectable . _lastActive = $ ( e . currentTarget ) . closest ( "tr" ) . find ( CELLSELECTORVALID ) . last ( ) ;
132+ last = that . selectable . _lastActive = $ ( e . currentTarget ) . closest ( "tr" ) . find ( CELLSELECTORVALID ) . last ( ) ;
133133 that . selectable . selectRange ( first , last , { event : e } ) ;
134134 that . _current = that . _value = that . _toDateObject ( last . find ( "a" ) ) ;
135- that . _class ( FOCUSED , that . _current ) ;
135+ that . _class ( FOCUSED , that . _current ) ;
136136 } ) ;
137137 }
138138
@@ -428,9 +428,9 @@ var __meta__ = { // jshint ignore:line
428428 validSelectedDates = $ . grep ( datesUnique , function ( value ) {
429429 if ( value ) {
430430 return + that . _validateValue ( new Date ( value . setHours ( 0 , 0 , 0 , 0 ) ) ) === + value ;
431- }
431+ }
432432 } ) ;
433- that . _selectDates = validSelectedDates . length > 0 ? validSelectedDates : that . _selectDates ;
433+ that . _selectDates = validSelectedDates . length > 0 ? validSelectedDates : ( datesUnique . length === 0 ? datesUnique : that . _selectDates ) ;
434434 that . _visualizeSelectedDatesInView ( ) ;
435435 } ,
436436
@@ -454,20 +454,20 @@ var __meta__ = { // jshint ignore:line
454454 that . _cell . removeClass ( SELECTED ) ;
455455 } else {
456456 that . _changeView = ! value || view && view . compare ( value , that . _current ) !== 0 ;
457- that . navigate ( value ) ;
457+ that . navigate ( value ) ;
458458 }
459459 } ,
460460
461461 _validateValue : function ( value ) {
462- var that = this ,
462+ var that = this ,
463463 options = that . options ,
464464 min = options . min ,
465- max = options . max ;
465+ max = options . max ;
466466
467467 if ( value === null ) {
468468 that . _current = createDate ( that . _current . getFullYear ( ) , that . _current . getMonth ( ) , that . _current . getDate ( ) ) ;
469469 }
470-
470+
471471 value = parse ( value , options . format , options . culture ) ;
472472
473473 if ( value !== null ) {
@@ -484,7 +484,7 @@ var __meta__ = { // jshint ignore:line
484484 that . _value = null ;
485485 }
486486
487- return that . _value ;
487+ return that . _value ;
488488 } ,
489489
490490 _visualizeSelectedDatesInView : function ( ) {
@@ -499,7 +499,7 @@ var __meta__ = { // jshint ignore:line
499499 var cells = that . _table
500500 . find ( CELLSELECTOR )
501501 . filter ( function ( index , element ) {
502- return selectedDates [ $ ( element . firstChild ) . attr ( kendo . attr ( VALUE ) ) ] ;
502+ return selectedDates [ $ ( element . firstChild ) . attr ( kendo . attr ( VALUE ) ) ] ;
503503 } ) ;
504504 if ( cells . length > 0 ) {
505505 that . selectable . _selectElement ( cells , true ) ;
@@ -536,12 +536,12 @@ var __meta__ = { // jshint ignore:line
536536
537537 _onRelatedTarget : function ( target ) {
538538 var that = this ;
539-
539+
540540 if ( that . selectable . options . multiple && target . is ( CELLSELECTORVALID ) ) {
541541 that . _current = that . _toDateObject ( target . find ( "a" ) ) ;
542542 that . _class ( FOCUSED , that . _toDateObject ( target . find ( "a" ) ) ) ;
543543 }
544-
544+
545545 } ,
546546
547547 _onSelect : function ( e ) {
@@ -561,9 +561,9 @@ var __meta__ = { // jshint ignore:line
561561
562562 if ( eventArgs . event . ctrlKey ) {
563563 if ( $ ( eventArgs . event . currentTarget ) . is ( CELLSELECTORVALID ) ) {
564- that . _toggleSelection ( $ ( eventArgs . event . currentTarget ) ) ;
564+ that . _toggleSelection ( $ ( eventArgs . event . currentTarget ) ) ;
565565 }
566- else {
566+ else {
567567 that . _cellsBySelector ( CELLSELECTORVALID ) . each ( function ( index , element ) {
568568 var value = that . _toDateObject ( $ ( element ) . find ( "a" ) ) ;
569569 that . _deselect ( value ) ;
@@ -579,9 +579,9 @@ var __meta__ = { // jshint ignore:line
579579 }
580580 else {
581581 that . _selectDates = [ ] ;
582- that . _addSelectedCellsToArray ( ) ;
582+ that . _addSelectedCellsToArray ( ) ;
583583 }
584- that . trigger ( CHANGE ) ;
584+ that . trigger ( CHANGE ) ;
585585 } ,
586586
587587 _destroySelectable : function ( ) {
@@ -602,22 +602,22 @@ var __meta__ = { // jshint ignore:line
602602 }
603603 else {
604604 that . _deselect ( date ) ;
605- }
605+ }
606606 } ,
607-
607+
608608 //shift selection
609609 _rangeSelection : function ( toDateCell , startDate ) {
610610 var that = this ,
611611 fromDate = startDate || that . _toDateObject ( that . selectable . value ( ) . first ( ) . find ( "a" ) ) ,
612612 toDate = that . _toDateObject ( toDateCell . find ( "a" ) ) ,
613613 daysDifference ;
614-
614+
615615 if ( that . selectable . _lastActive || that . _value ) {
616616 fromDate = that . selectable . _lastActive ? that . _toDateObject ( that . selectable . _lastActive . find ( "a" ) ) : new Date ( + that . _value ) ;
617617 } else {
618618 that . selectable . _lastActive = startDate ? that . _cellByDate ( that . _view . toDateString ( startDate ) , CELLSELECTORVALID ) : that . selectable . value ( ) . first ( ) ;
619619 }
620-
620+
621621 that . _selectDates = [ ] ;
622622 daysDifference = daysBetweenTwoDates ( fromDate , toDate ) ;
623623 addDaysToArray ( that . _selectDates , daysDifference , fromDate , that . options . disableDates ) ;
@@ -635,14 +635,14 @@ var __meta__ = { // jshint ignore:line
635635 that . selectable . value ( ) . each ( function ( index , item ) {
636636 var date = that . _toDateObject ( $ ( item . firstChild ) ) ;
637637 if ( ! that . options . disableDates ( date ) ) {
638- that . _selectDates . push ( date ) ;
639- }
638+ that . _selectDates . push ( date ) ;
639+ }
640640 } ) ;
641641 } ,
642642
643643 _deselect : function ( date ) {
644644 var that = this ;
645-
645+
646646 var currentDateIndex = that . _selectDates . map ( Number ) . indexOf ( + date ) ;
647647 if ( currentDateIndex != - 1 ) {
648648 that . _selectDates . splice ( currentDateIndex , 1 ) ;
@@ -657,7 +657,7 @@ var __meta__ = { // jshint ignore:line
657657 return + date <= + lastDateInView && + date >= + firstDateInView ;
658658 } ,
659659
660-
660+
661661
662662 _move : function ( e ) {
663663 var that = this ,
@@ -700,7 +700,7 @@ var __meta__ = { // jshint ignore:line
700700 currentValue . setFullYear ( temp . getFullYear ( ) ) ;
701701 prevent = true ;
702702 }
703-
703+
704704 if ( e . ctrlKey ) {
705705 if ( key == keys . RIGHT && ! isRtl || key == keys . LEFT && isRtl ) {
706706 that . navigateToFuture ( ) ;
@@ -720,8 +720,8 @@ var __meta__ = { // jshint ignore:line
720720
721721 var focusedDate = that . _toDateObject ( $ ( that . _cell [ 0 ] ) . find ( "a" ) ) ;
722722 that . _class ( FOCUSED , focusedDate ) ;
723-
724- }
723+
724+ }
725725 } else if ( e . shiftKey ) {
726726 if ( value !== undefined || method ) {
727727 if ( ! method ) {
@@ -735,11 +735,11 @@ var __meta__ = { // jshint ignore:line
735735 min = createDate ( min . getFullYear ( ) , min . getMonth ( ) , min . getDate ( ) ) ;
736736 if ( isInRange ( currentValue , min , max ) ) {
737737 if ( that . _isMultipleSelection ( ) ) {
738- that . _keyboardRangeSelection ( e , currentValue ) ;
738+ that . _keyboardRangeSelection ( e , currentValue ) ;
739739 }
740740 else {
741741 that . _focus ( restrictValue ( currentValue , options . min , options . max ) ) ;
742- }
742+ }
743743 }
744744 }
745745 } else {
@@ -784,7 +784,7 @@ var __meta__ = { // jshint ignore:line
784784 }
785785 else {
786786 that . _focus ( restrictValue ( currentValue , options . min , options . max ) ) ;
787- }
787+ }
788788 }
789789 }
790790 }
@@ -807,13 +807,13 @@ var __meta__ = { // jshint ignore:line
807807 fromDate = that . selectable . _lastActive ? that . _toDateObject ( that . selectable . _lastActive . find ( "a" ) ) : currentValue ;
808808 daysDifference = daysBetweenTwoDates ( fromDate , new Date ( + currentValue ) ) ;
809809
810- addDaysToArray ( that . _selectDates , daysDifference , fromDate , that . options . disableDates ) ;
810+ addDaysToArray ( that . _selectDates , daysDifference , fromDate , that . options . disableDates ) ;
811811
812812 that . navigate ( currentValue ) ;
813813 that . _current = currentValue ;
814814 that . selectable . _lastActive = that . selectable . _lastActive || that . _cellByDate ( that . _view . toDateString ( currentValue ) , CELLSELECTORVALID ) ;
815815 that . trigger ( CHANGE ) ;
816- return ;
816+ return ;
817817 }
818818 that . selectable . options . filter = that . wrapper . find ( "table" ) . length > 1 && + currentValue > + that . _current ? "table.k-month:eq(1) " + CELLSELECTORVALID : "table.k-month:eq(0) " + CELLSELECTORVALID ;
819819 that . _class ( FOCUSED , currentValue ) ;
@@ -834,7 +834,7 @@ var __meta__ = { // jshint ignore:line
834834
835835 if ( $ ( that . _cell [ 0 ] ) . hasClass ( SELECTED ) ) {
836836 that . selectable . _unselect ( $ ( that . _cell [ 0 ] ) ) ;
837- that . selectable . trigger ( CHANGE , { event : event } ) ;
837+ that . selectable . trigger ( CHANGE , { event : event } ) ;
838838 }
839839 else {
840840 that . selectable . value ( $ ( that . _cell [ 0 ] ) , { event : event } ) ;
@@ -1730,8 +1730,8 @@ var __meta__ = { // jshint ignore:line
17301730 nextDay = new Date ( nextDay . setDate ( nextDay . getDate ( ) + i ) ) ;
17311731 if ( ! disableDates ( nextDay ) ) {
17321732 array . push ( nextDay ) ;
1733- }
1734- }
1733+ }
1734+ }
17351735 }
17361736
17371737 function mousetoggle ( e ) {
0 commit comments