DateRangeEditorComponent constructor

DateRangeEditorComponent(
  1. Element _elementRef,
  2. DomService _domService,
  3. NgZone _ngZone,
  4. @Optional() DateRangeEditorHost? editorHost,
  5. @Optional() @Inject(datepickerClock) Clock? clock,
  6. Clock legacyClock,
)

Implementation

DateRangeEditorComponent(
    this._elementRef,
    this._domService,
    this._ngZone,
    @Optional() DateRangeEditorHost? editorHost,
    @Optional() @Inject(datepickerClock) Clock? clock,
    Clock legacyClock) {
  // TODO(google): Migrate to use only datepickerClock
  _clock ??= legacyClock;
  _today = Date.today(_clock);
  editorHost?.dateRangeEditorCreated(this);
  nextPrevModel = DateRangeEditorNextPrevModel(onNext: () {
    calendarPicker?.scrollToDate(_visibleMonth!.add(months: 1));
  }, onPrev: () {
    calendarPicker?.scrollToDate(_visibleMonth!.add(months: -1));
  });
}