DateRangeField
Collects an inclusive range using two calendar months or presets.
When to use
- Set a period for a report or a reservation.
Examples
Choose a date range
Loading the example
<k:DateRangeField label="Report period" start="2026-12-01" end="2026-12-07" change=".onChange"/>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.DateRangeFieldChange", {
onChange(event) {
Toast.show("Report period updated");
}
}));Limit a reservation window
Both boundary days are included. The reservation can only use dates in December 2026.
Loading the example
<k:DateRangeField label="Equipment reservation" start="2026-12-07" end="2026-12-09" presets="false" min="2026-12-01" max="2026-12-31" required="true" change=".onChange"/>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.DateRangeFieldChange", {
onChange(event) {
Toast.show("Reservation dates updated");
}
}));API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
start | any | null | Start as yyyy-MM-dd or a Date object |
end | any | null | Inclusive end date |
presets | boolean | true | Whether to show preset ranges |
label | string | Field label | |
placeholder | string | Placeholder | |
help | string | Supporting text | |
error | string | Validation message | |
min | any | Earliest selectable day | |
max | any | Latest selectable day | |
workdays | boolean | false | Whether selection excludes weekends |
marks | object | Map from dates to notes displayed in the calendar | |
required | boolean | false | Whether a range is required |
enabled | boolean | true | Whether the field can be used |
Events
| Name | Type | Description |
|---|---|---|
change | start: anyend: any | The range changed |