MaterialDateRangePickerComponent constructor
MaterialDateRangePickerComponent(
- @Optional() @Inject(datepickerClock) Clock? clock,
- Clock legacyClock,
- @Optional() DatepickerConfig? config,
- @Attribute('popupClass') String? popupClass,
- @Optional() @SkipSelf() PopupSizeProvider? _popupSizeProvider,
- HtmlElement element,
- DomService _domService,
- NgZone _ngZone,
Implementation
MaterialDateRangePickerComponent(
@Optional() @Inject(datepickerClock) Clock? clock,
Clock legacyClock,
@Optional() DatepickerConfig? config,
@Attribute('popupClass') String? popupClass,
@Optional() @SkipSelf() this._popupSizeProvider,
HtmlElement element,
this._domService,
this._ngZone)
: _config = config ?? DatepickerConfig(),
popupClassName = constructEncapsulatedCss(popupClass, element.classes) {
// TODO(google): Migrate to use only datepickerClock
clock ??= legacyClock;
// Init minDate and maxDate to sensible defaults
var now = clock.now();
minDate = Date(now.year - 10, DateTime.january, 1);
maxDate = Date(now.year + 10, DateTime.december, 31);
}