Search results

DateRangePickerComponent

Represents the Essential JS 2 VueJS DateRangePicker Component.

<ejs-daterangepicker v-bind:startDate='date' v-bind:endDate='date'></ejs-daterangepicker>

Properties

allowEdit

boolean

Specifies whether the input textbox is editable or not. Here the user can select the value from the popup and cannot edit in the input textbox.

Defaults to true

cssClass

string

Sets the root CSS class to the DateRangePicker which allows you to customize the appearance.

Defaults to

enablePersistence

boolean

Enable or disable the persisting component’s state between the page reloads. If enabled, following list of states will be persisted.

  1. startDate
  2. endDate
  3. value

Defaults to false

enableRtl

boolean

Specifies the DateRangePicker in RTL mode that displays the content in the right-to-left direction.

Defaults to false

enabled

boolean

Specifies the component to be disabled which prevents the DateRangePicker from user interactions.

Defaults to true

endDate

Date

Gets or sets the end date of the date range selection.

Defaults to null

firstDayOfWeek

number

Gets or sets the Calendar’s first day of the week. By default, the first day of the week will be based on the current culture.

For more details about firstDayOfWeek refer to First day of week documentation.

Defaults to null

floatLabelType

FloatLabelType | string

Specifies the placeholder text to be floated. Possible values are: Never: The label will never float in the input when the placeholder is available. Always: The floating label will always float above the input. Auto: The floating label will float above the input after focusing or entering a value in the input.

Defaults to Syncfusion.EJ2.Inputs.FloatLabelType.Never

format

string

Sets or gets the required date format to the start and end date string.

For more details refer to Formatsample.

Defaults to null

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to ‘en-US’

max

Date

Gets or sets the maximum date that can be selected in the calendar-popup.

Defaults to new Date(2099, 11, 31)

maxDays

number

Specifies the maximum span of days that can be allowed in a date range selection.

For more details refer to Range Span documentation.

Defaults to null

min

Date

Gets or sets the minimum date that can be selected in the calendar-popup.

Defaults to new Date(1900, 00, 01)

minDays

number

Specifies the minimum span of days that can be allowed in date range selection.

For more details refer to [Range Span] (../daterangepicker/range-restriction#range-span) documentation.

Defaults to null

placeholder

string

Specifies the placeholder text that need to be displayed in the DateRangePicker component.

Defaults to null

presets

PresetsModel[]

Set the predefined ranges which let the user pick required range easily in a component.

For more details refer to Preset Ranges documentation.

Defaults to null

readonly

boolean

Denies the editing the ranges in the DateRangePicker component.

Defaults to false

separator

string

Sets or gets the string that used between the start and end date string.

Defaults to ’-’

showClearButton

boolean

Specifies whether to show or hide the clear icon

Defaults to true

startDate

Date

Gets or sets the start date of the date range selection.

Defaults to null

strictMode

boolean

Specifies the component to act as strict which allows entering only a valid date range in a DateRangePicker.

For more details refer to Strict Modedocumentation.

Defaults to false

value

Date[] | DateRange

Gets or sets the start and end date of the Calendar.

Defaults to null

weekNumber

boolean

Determines whether the week number of the Calendar is to be displayed or not. The week number is displayed in every week row.

For more details about weekNumber refer to Calendar with week numberdocumentation.

Defaults to false

width

number | string

Specifies the width of the DateRangePicker component.

Defaults to

zIndex

number

specifies the z-index value of the dateRangePicker popup element.

Defaults to 1000

Methods

destroy

To destroy the widget.

Returns void

focusIn

Sets the focus to widget for interaction.

Returns void

focusOut

Remove the focus from widget, if the widget is in focus state.

Returns void

getPersistData

Return the properties that are maintained upon browser refresh.

Returns string

getSelectedRange

Return the selected range and day span in the DateRangePicker.

Returns Object

hide

To close the Popup container in the DateRangePicker component.

Returns void

show

To open the Popup container in the DateRangePicker component.

Returns void

Events

blur

EmitType<BlurEventArgs>

Triggers when the control loses the focus.

change

EmitType<RangeEventArgs>

Triggers when the Calendar value is changed.

close

EmitType<Object>

Triggers when the DateRangePicker is closed.

created

EmitType<Object>

Triggers when Calendar is created.

destroyed

EmitType<Object>

Triggers when Calendar is destroyed.

focus

EmitType<FocusEventArgs>

Triggers when the control gets focus.

Triggers when the Calendar is navigated to another view or within the same level of view.

open

EmitType<Object>

Triggers when the DateRangePicker is opened.

renderDayCell

EmitType<RenderDayCellEventArgs>

Triggers when each day cell of the Calendar is rendered.

select

EmitType<Object>

Triggers on selecting the start and end date.