Skip to content

Commit 8ebbd89

Browse files
committed
Added read attributes to CalendarView variables and fixed comments in concrete classes
1 parent daf37d6 commit 8ebbd89

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

src/cdk/datepicker/calendar-view.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,28 @@ import {Subject} from 'rxjs';
1010

1111
/**
1212
* An abstract calendar that is used as part of the datepicker. This abstract calendar class
13-
* contains all necessary parts needed for a generic datepicker component. The material calendar,
14-
* month, year, and multi-year views will all extend this abstract calendar to provide overall
15-
* functionality of a datepicker component.
16-
* @docs-private
13+
* contains all necessary parts needed for a generic datepicker component.
1714
*/
1815
export abstract class CalendarView<D> {
1916

20-
/** A date representing when to start the calendar. */
17+
/** The date representing when to start the calendar. */
18+
abstract get activeDate();
2119
abstract set activeDate(value: D);
2220

2321
/** The minimum selectable date. */
22+
abstract get minDate();
2423
abstract set minDate(value: D | null);
2524

2625
/** The maximum selectable date. */
26+
abstract get maxDate();
2727
abstract set maxDate(value: D | null);
2828

2929
/** The currently selected date. */
30+
abstract get selected();
3031
abstract set selected(value: D | null);
3132

3233
/**
3334
* Emits whenever there is a state change that needs to be responded to.
3435
*/
35-
changes = new Subject<D>();
36+
readonly changes = new Subject<D>();
3637
}

src/cdk/datepicker/datepicker.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/lib/datepicker/calendar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ export class MatCalendarHeader<D> {
155155
}
156156

157157
/**
158-
* A calendar that is used as part of the datepicker.
158+
* A calendar that is used as part of the datepicker. This component will be an
159+
* extension of the CalendarView component in the datepicker CDK.
159160
* @docs-private
160161
*/
161162
@Component({

src/lib/datepicker/month-view.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ const DAYS_PER_WEEK = 7;
4141

4242

4343
/**
44-
* An internal component used to display a single month in the datepicker.
44+
* An internal component used to display a single month in the datepicker. This component will be an
45+
* extension of the CalendarView component in the datepicker CDK.
4546
* @docs-private
4647
*/
4748
@Component({

src/lib/datepicker/multi-year-view.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export const yearsPerRow = 4;
4141

4242

4343
/**
44-
* An internal component used to display a year selector in the datepicker.
44+
* An internal component used to display a year selector in the datepicker. This component will be
45+
* an extension of the CalendarView component in the datepicker CDK.
4546
* @docs-private
4647
*/
4748
@Component({

src/lib/datepicker/year-view.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ import {MatCalendarBody, MatCalendarCell} from './calendar-body';
3737
import {createMissingDateImplError} from './datepicker-errors';
3838

3939
/**
40-
* An internal component used to display a single year in the datepicker.
40+
* An internal component used to display a single year in the datepicker. This component will be an
41+
* extension of the CalendarView component in the datepicker CDK.
4142
* @docs-private
4243
*/
4344
@Component({

0 commit comments

Comments
 (0)