DateRangeEditorComponent class

Everything needed to edit a DateRangeComparison. Glues together the preset list, the text boxes, the next/prev, and the calendar. This is meant to be used in the material-date-range-picker, and doesn't make much sense outside of that component.

Example Usage:

<date-range-editor [model]="model" [presets]="presets">
</date-range-editor>
Implemented types
Annotations
  • @Component(selector: 'date-range-editor', templateUrl: 'date_range_editor.html', styleUrls: ['date_range_editor.scss.css'], directives: [ButtonDirective, ComparisonRangeEditorComponent, DateRangeInputComponent, FocusItemDirective, FocusListDirective, KeyboardOnlyFocusIndicatorDirective, MaterialButtonComponent, MaterialCalendarPickerComponent, MaterialIconComponent, materialInputDirectives, MaterialMonthPickerComponent, MaterialPopupComponent, MaterialRippleComponent, MaterialSelectComponent, MaterialSelectItemComponent, MaterialTooltipDirective, MenuItemGroupsComponent, MenuRootDirective, NextPrevComponent, NgFor, NgIf, PopupSourceDirective, ShowHideDirective, ElementScrollHost])

Constructors

DateRangeEditorComponent(Element _elementRef, DomService _domService, NgZone _ngZone, @Optional() DateRangeEditorHost? editorHost, @Optional() @Inject(datepickerClock) Clock? clock, Clock legacyClock)

Properties

activeDateFormat ↔ DateFormat
The DateFormat used to format dates when the input is active.
getter/setter pair
allowHighlightUpdates bool
Set this to false to temporarily suppress updates to the calendar's range highlights.
getter/setter pair
calendarPicker MaterialCalendarPickerComponent?
getter/setter pair
compact bool
Whether to enable compact calendar styles.
getter/setter pair
customRangeDescription String
no setter
dateFormat ↔ DateFormat
The DateFormat used to format dates.
getter/setter pair
daysToToday String
getter/setter pair
daysToTodayRange DatepickerDateRange
A range corresponding to the 'days up to today' input.
getter/setter pair
daysToYesterday String
getter/setter pair
daysToYesterdayRange DatepickerDateRange
A range corresponding to the 'days to yesterday' input.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isBasic bool
Whether or not this date range picker is basic.
no setter
isCalendarCreated bool
getter/setter pair
isClearRangeSelected bool
no setter
isCustomComparisonValid bool
Checks if custom comparison is a valid option.
no setter
isCustomRangeSelected bool
no setter
isPredefinedRangeSelected bool
no setter
maxDate Date
Dates later than maxDate cannot be chosen. Defaults to Dec 31, 9999.
getter/setter pair
maxDaysInputLength int
no setter
minDate Date
Dates earlier than minDate cannot be chosen. Defaults to Jan 1, 1000.
getter/setter pair
model DateRangeEditorModel
A mutable model which fully describes the selected date range and the state of the calendar.
getter/setter pair
monthSelector MaterialMonthPickerComponent?
getter/setter pair
monthSelectorState CalendarState
getter/setter pair
movingStartMaintainsLength bool
For date range selection, whether clicking to move the start date should also move the end date (preserving the length of the selected range).
getter/setter pair
nextPrevModel DateRangeEditorNextPrevModel
The model for scrolling to the next or previous month.
getter/setter pair
presetRangeSelected Stream<UIEvent?>
Event which fires when one of the ranges is selected.
no setter
presets List<DatepickerPreset>
A list of preset date ranges which the user can choose from.
getter/setter pair
presetsMenu MenuModel
no setter
ranges List<DatepickerDateRange>
A list of predefined date ranges which the user can choose from. These are subject to clamping by minDate and maxDate, and are excluded entirely if their end point is before minDate or their start point is after maxDate.
no getter
rangeTitle String
no setter
relativeDaysToToday bool
Whether to use LastNDaysToTodayRange to represent "N days up to today".
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldShowCustomDateRangeColumn bool
no setter
shouldShowPredefinedList bool
no setter
showMonthSelector bool
getter/setter pair
supportsClearRange bool
Whether or not this date range picker supports clearing date range.
getter/setter pair
supportsComparison bool
Whether or not this editor includes a section to edit a comparison date range.
getter/setter pair
supportsCustomRange bool
Whether or not this date range picker supports choosing custom range. Calendar will be hidden when custom range is not supported.
getter/setter pair
supportsDaysInputs bool
Whether or not this editor includes a section to input 'N days up to today' and 'N days up to yesterday' ranges.
getter/setter pair
supportsMonthSelector bool
Whether to display the month selector dropdown and next-prev-buttons.
getter/setter pair
useMenuForPresets bool
Whether to use menu-items-groups for presets for improved accessibility.
getter/setter pair
visibleMonthName String
no setter

Methods

disableCustomMode() → void
focus() → void
Item/component focuses itself
override
isAlternativePresetSelected(DatepickerPreset alternative) bool
isSelected(DatepickerDateRange range) bool
isValid(DatepickerPreset preset) bool
ngAfterViewInit() → void
ngOnInit() → void
Executed after the first change detection run for a directive.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAlternativePresetClicked(UIEvent? event, DatepickerPreset parent, DatepickerPreset alternative) → void
onClearRangeClicked(UIEvent event) → void
Clears existing range.
onCustomClicked() → void
Replace existing range with a Custom range having the same endpoints as the current selection
onMonthSelectorDropdownClicked() → void
onRangeClicked(UIEvent? event, DatepickerDateRange range) → void
onVisibleMonthChange(Date month) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited