Contains types that are being used by the parent application in order to initialise
a DateRangePicker.
Used in order to configure the Calendar part of the DateRangePicker.
today: Represents today as DateTime provided by the parent application.
primaryDate: Represents the default month - year calendar screen.
If the primaryDate is set to Nothing the DateRangePicker will
set the primaryDate equal to the today property.
If the consumer has provided both a primaryDate and a dateLimit
but the primaryDate is out of bounds, the DateRangePicker will set
the primaryDate equal to the minium date of the constrains.
dateLimit: Used to impose date restrictions on the DateRangePicker.
The different configuration settings can be seen on the
DateLimit definition.
dateRangeOffset: Used to set a minimum length on the selected date range.
This basically means that if we set a minimumDateRangeLength of 3, the user
will be able to select a minimum of 3 dates.
The optional DateRangePicker date restrictions. You can cover most of the
date restriction cases with the type below. If by any change you need to achieve
a case which is not possible by the current implementation please raise an issue
on the repository of the package.
-- A Custom imposed restriction for the year 2019
-- inclusive of the minDate and maxDate.
DateLimit { minDate = 1 Jan 2019, maxDate = 31 Dec 2019 }
-- An unlimited Calendar.
NoLimit { disablePastDates = False }
-- Allows only `future date selection`.
NoLimit { disablePastDates = True }Used in order to configure the TimePicker part of the DateRangePicker.
pickerType: Defines the type of the picker as described in the TimePicker module.
defaultTime: Defines the defaultTime that will be used as the default value of the TimePicker.
pickerTitles: Defines the TimePicker titles.
mirrorTimes: Dictates if both the TimePickers should be in sync.
Note: The synchronisation takes place using the
onBlur
event of the input.
The Calendar ViewType.
Single date range picker.
Single date-time range picker.
Double date range picker.
Double date-time range picker.