(timestamp: number, isShift: boolean)
| 532 | } |
| 533 | |
| 534 | _updateSelectedDates(timestamp: number, isShift: boolean) { |
| 535 | if (this.selectionMode === CalendarSelectionMode.Multiple) { |
| 536 | if (this.selectedDates.length > 0 && isShift) { |
| 537 | this._multipleSelection(timestamp); |
| 538 | } else { |
| 539 | this._toggleTimestampInSelection(timestamp); |
| 540 | } |
| 541 | return; |
| 542 | } |
| 543 | |
| 544 | announce(DayPicker.i18nBundle.getText(LIST_ITEM_SELECTED), InvisibleMessageMode.Assertive); |
| 545 | if (this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) { |
| 546 | this.selectedDates = [this.selectedDates[0], timestamp]; |
| 547 | return; |
| 548 | } |
| 549 | |
| 550 | this.selectedDates = [timestamp]; |
| 551 | } |
| 552 | |
| 553 | /** |
| 554 | * Selects/deselects the whole row (week). |
no test coverage detected