New to Kendo UI for AngularStart a free 30-day trial

DateRangeService

Manages communication between components inside the DateRangeComponent. For example, handles interactions between the start and end DateInput components and the DateRangePopup component.

NameTypeDefaultDescription

activeRangeEnd

SelectionRangeEnd

Gets the current activeRangeEnd value.

activeRangeEnd$

BehaviorSubject<SelectionRangeEnd>

Notifies when the activeRangeEnd state changes.

dateRangePopup$

BehaviorSubject<DateRangePopupComponent>

Notifies when the DateRangePopup component changes.

endInput$

BehaviorSubject<DateInputComponent>

Notifies when the end DateInput component changes. For example, when you attach a new end DateInput or detach the old one.

focusedDate

Date

Gets the current focusedDate value.

focusedDate$

BehaviorSubject<Date>

Notifies when the focusedDate changes.

max

Date

Gets the maximum range value. Takes the max value from the end DateInput component or the max value of the calendar.

min

Date

Gets the minimum range value. Takes the min value from the start DateInput component or the min value of the calendar.

range$

BehaviorSubject<SelectionRange>

Notifies when the selection range state changes.

selectionRange

SelectionRange

Gets the current selectionRange value.

startInput$

BehaviorSubject<DateInputComponent>

Notifies when the start DateInput component changes. For example, when you attach a new start DateInput or detach the old one.

Methods

activatePopup

Opens the registered DateRangePopup component. Opens the popup and focuses the calendar.

deactivatePopup

Deactivates the registered DateRangePopup component. The method closes the popup.

destroy

Completes all observables to prevent memory leaks. Call this method when you destroy a component that uses the service.

hasActiveComponent

Checks if any component inside the DateRangeComponent is active. For example, detects an open popup or a focused DateInput component.

Returns

boolean

Returns true if an active component is present.

registerEndInput

Registers a new end DateInput component and notifies all endInput$ listeners.

Parameters

endInput

DateInputComponent

registerPopup

Registers a new DateRangePopup component and notifies all dateRangePopup$ listeners.

Parameters

dateRangePopup

DateRangePopupComponent

registerStartInput

Registers a new start DateInput component and notifies all startInput$ listeners.

Parameters

startInput

DateInputComponent

setActiveRangeEnd

Updates the activeRangeEnd value and notifies all activeRangeEnd$ listeners.

Parameters

activeRange

SelectionRangeEnd

setFocusedDate

Updates the focused date and notifies all focusedDate$ listeners.

Parameters

value

Date

setRange

Updates the selection range and notifies all range$ listeners.

Parameters

range

SelectionRange

In this article
Methods
Not finding the help you need?
Contact Support