Sets the current range based on a model value.
(selectedValue: DateRange<D> | D | null)
| 597 | |
| 598 | /** Sets the current range based on a model value. */ |
| 599 | private _setRanges(selectedValue: DateRange<D> | D | null) { |
| 600 | if (selectedValue instanceof DateRange) { |
| 601 | this._rangeStart.set(this._getCellCompareValue(selectedValue.start)); |
| 602 | this._rangeEnd.set(this._getCellCompareValue(selectedValue.end)); |
| 603 | this._isRange.set(true); |
| 604 | } else { |
| 605 | this._rangeStart.set(this._getCellCompareValue(selectedValue)); |
| 606 | this._rangeEnd.set(this._rangeStart()); |
| 607 | this._isRange.set(false); |
| 608 | } |
| 609 | |
| 610 | this._comparisonRangeStart.set(this._getCellCompareValue(this.comparisonStart)); |
| 611 | this._comparisonRangeEnd.set(this._getCellCompareValue(this.comparisonEnd)); |
| 612 | } |
| 613 | |
| 614 | /** Gets whether a date can be selected in the month view. */ |
| 615 | private _canSelect(date: D) { |
no test coverage detected