source: trip-planner-front/node_modules/@angular/material/esm2015/datepicker/date-range-picker.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 5.7 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
9import { MatDatepickerBase } from './datepicker-base';
10import { MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER } from './date-selection-model';
11import { MAT_CALENDAR_RANGE_STRATEGY_PROVIDER } from './date-range-selection-strategy';
12// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit
13// template reference variables (e.g. #d vs #d="matDateRangePicker"). We can change this to a
14// directive if angular adds support for `exportAs: '$implicit'` on directives.
15/** Component responsible for managing the date range picker popup/dialog. */
16export class MatDateRangePicker extends MatDatepickerBase {
17 _forwardContentValues(instance) {
18 super._forwardContentValues(instance);
19 const input = this.datepickerInput;
20 if (input) {
21 instance.comparisonStart = input.comparisonStart;
22 instance.comparisonEnd = input.comparisonEnd;
23 }
24 }
25}
26MatDateRangePicker.decorators = [
27 { type: Component, args: [{
28 selector: 'mat-date-range-picker',
29 template: '',
30 exportAs: 'matDateRangePicker',
31 changeDetection: ChangeDetectionStrategy.OnPush,
32 encapsulation: ViewEncapsulation.None,
33 providers: [
34 MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
35 MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
36 { provide: MatDatepickerBase, useExisting: MatDateRangePicker },
37 ]
38 },] }
39];
40//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1yYW5nZS1waWNrZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvZGF0ZXB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