DateRangePopupComponent
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:
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.
'none'
adaptiveSubtitle
string
Specifies the subtitle text displayed in the header of the action sheet.
Applies only when AdaptiveMode is set to auto.
""
adaptiveTitle
string
Specifies the title text for the input element and the header of the action sheet.
Applies only when AdaptiveMode is set to auto.
""
allowReverse
boolean
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.
false
anchor
ElementRef<any>
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.
anchorAlign
Align
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.
true
animateNavigation
boolean
Determines whether to animate transitions when users navigate between views.
false
appendTo
ViewContainerRef | "root" | "component"
Specifies where to render the popup container. By default, the popup renders in the root component.
'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.
false
disabledDates
Date[] | Day[] | (date: Date) => boolean
Specifies the dates in the MultiViewCalendar that you want to disable (see example).
focusedDate
Date
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).
'2099-12-31'
min
Date
Specifies the minimum date that users can select (see example).
'1900-01-01'
popupAlign
Align
Specifies the alignment point for the popup element. For more information, refer to the section on positioning.
showOtherMonthDays
boolean
Determines whether to display days from adjacent months in the current month view (see example).
false
showViewHeader
boolean
Determines whether to display a header for each view (see example). For example, displays the month name in the month view.
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.
2
weekNumber
boolean
Determines whether to display week numbers in the month view (see example).
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
blur
EventEmitter<null>
Fires when the calendar element loses focus (see example).
cancel
EventEmitter<null>
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.
focus
EventEmitter<null>
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.
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.
The state of the popup.