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

Represents the Kendo UI DateRangePopup component for Angular.

Definition

Package:@progress/kendo-angular-dateinputs

Selector:kendo-daterange-popup

Export Name:Accessible in templates as #kendo-daterange-popupInstance="kendo-daterange-popup"

Syntax:

ts
import { DateInputsModule, DateRangeService } from '@progress/kendo-angular-dateinputs';

_@Component({
providers: [DateRangeService],
selector: 'my-app',
template: `
 <button #anchor (click)="popup.toggle()">Toggle</button>
 <kendo-daterange-popup [anchor]="anchor" #popup></kendo-daterange-popup>
`
})
export class AppComponent {
}

Inputs

Specifies the initial view that the MultiViewCalendar displays when it loads (see example). By default, the active view is month.

You have to set activeView within the topView-bottomView range.

Determines whether the component uses adaptive rendering for different screen sizes. By default, adaptive rendering is disabled.

Default:

'none'

Specifies the subtitle text displayed in the header of the action sheet. Applies only when AdaptiveMode is set to auto.

Default:

""

Specifies the title text for the input element and the header of the action sheet. Applies only when AdaptiveMode is set to auto.

Default:

""

Determines whether users can select dates in reverse order. When you set allowReverse to true, the component does not validate if the start date comes after the end date.

Default:

false

Specifies the element that serves as an anchor for the popup. The popup opens next to this element. For more information, refer to the section on aligning to specific components.

Specifies the alignment point for the anchor element. For more information, refer to the section on positioning.

animate

boolean | PopupAnimation

Controls the popup animations. When you set animate to true, the popup displays opening and closing animations. For more information about controlling the popup animations, refer to the article on animations.

Default:

true

Determines whether to animate transitions when users navigate between views.

Default:

false

appendTo

ViewContainerRef | "root" | "component"

Specifies where to render the popup container. By default, the popup renders in the root component.

Default:

'root'

Specifies the lowest view level that users can navigate to (see example).

Configures how the popup behaves when it encounters viewport boundaries. For more information, refer to the article on viewport boundary detection.

disabled

boolean

Determines whether the MultiViewCalendar is interactive (see example). When you set disabled to true, users cannot interact with the component.

Default:

false

disabledDates

Date[] | Day[] | (date: Date) => boolean

Specifies the dates in the MultiViewCalendar that you want to disable (see example).

Specifies the focused date of the MultiViewCalendar component. Defines which date receives focus when the component loads (see example).

If the MultiViewCalendar is out of the min or max range, it normalizes the defined focusedDate.

margin

Margin

Specifies the margin around the popup in pixels. Creates empty space between the popup and its anchor element.

max

Date

Specifies the maximum date that users can select (see example).

Default:

'2099-12-31'

min

Date

Specifies the minimum date that users can select (see example).

Default:

'1900-01-01'

Specifies the alignment point for the popup element. For more information, refer to the section on positioning.

Determines whether to display days from adjacent months in the current month view (see example).

Default:

false

Determines whether to display a header for each view (see example). For example, displays the month name in the month view.

Default:

false

Specifies the highest view level that users can navigate to (see example).

views

number

Specifies the number of calendar views to display side by side.

Default:

2

weekNumber

boolean

Determines whether to display week numbers in the month view (see example).

Default:

false

Fields

Gets the active calendar that displays in the popup.

When the popup is closed, the property returns null.

isActive

boolean

Gets the active state of the component. Returns true when the opened calendar is active.

show

boolean

Gets or sets the visibility state of the component.

Events

Fires when the calendar element loses focus (see example).

Fires when the popup closes due to an ESC keypress or when it leaves the viewport (see example).

Fires when the popup is about to close (see example). You can prevent this event to keep the popup open.

Fires when the calendar element receives focus (see example).

Fires when the popup is about to open (see example). You can prevent this event to keep the popup closed.

Methods

Opens the popup component and focuses the calendar.

Focuses the calendar if it is available.

Checks if a focused element is inside the popup.

Returns:

boolean

Returns true if the focused element is inside the popup.

Toggles the visibility of the popup or action sheet. When you use the toggle method to show or hide the popup or action sheet, the open and close events do not fire.

Parameters:show?boolean

The state of the popup.