NC Date Range

Not yet released: this component will ship in an upcoming Native Rent package version.

NC Date Range is a start and end date picker with a calendar. Booked and blocked dates are shaded and cannot be picked. It outputs the Start Date, End Date, and number of Nights.

Use it for a rental window, a stay, or any scheduled period.

Layouts

LayoutAPI valueWhat the user seesExample
AutoautoOne month on a phone or a narrow column. Two months on a wide screen.A booking screen used on desktop and phone.
One monthoneOne month plus the date fields.A narrow column.
Two monthstwoTwo months side by side plus the date fields.A wide desktop booking panel.

Auto shows one month on a phone or when the component is under 600 px wide.

One month and Two months layouts on desktop. In the two-month calendar, booked November dates are struck through.
One month and Two months layouts on desktop. In the two-month calendar, booked November dates are struck through.

A first click sets the start. A click on a later date sets the end. The next click starts a new range. A click on a date before the start moves the start. Users can also type dates in the fields.

Booked and blocked dates

A 7-night stay from 16 to 23 March 2027. Blocked dates and dates outside the Earliest and Latest Date are struck through.
A 7-night stay from 16 to 23 March 2027. Blocked dates and dates outside the Earliest and Latest Date are struck through.
Minimum Nights 3: a 2-night range shows "Choose at least 3 nights." Blocked dates are struck through.
Minimum Nights 3: a 2-night range shows "Choose at least 3 nights." Blocked dates are struck through.
Maximum Nights 7: an 8-night range shows "Choose at most 7 nights." Blocked dates are struck through.
Maximum Nights 7: an 8-night range shows "Choose at most 7 nights." Blocked dates are struck through.

Add it to a screen

  1. Add NC Date Range to the screen. Set Label, and turn on Required if a full range is needed.
  2. Optionally map a Booked Records collection, and set Start Field and End Field, or leave them blank for StartDate and EndDate.
  3. Set Earliest Date, Latest Date, Minimum Nights, and Maximum Nights as needed. Add blocked dates as YYYY-MM-DD values.
  4. Map Start Date and End Date in and out of the same variables. Use Nights later in the flow if you need the length.

Validation

Next is blocked when the range is required and not complete, is shorter or longer than the night limits, or overlaps a booked or blocked date. The component shows its own message for each case. Booked days cannot be clicked.

While the end date is being picked, days after the start that would give fewer nights than Minimum Nights, or more than Maximum Nights, are struck through and cannot be picked. A screen reader reads the reason with the date, for example "Choose at least 3 nights." A typed end date that breaks the limit is cleared, the start is kept, and the message shows. A range that is set another way, for example by changing the start date afterwards, still shows the message and blocks Next.

When a date is not picked, Start Date or End Date is sent to the flow as empty (null), not as empty text.

A required NC Date Range after Next with no dates: "Choose a start and end date."
A required NC Date Range after Next with no dates: "Choose a start and end date."

Phone and desktop

Auto shows one month on a phone or a narrow column, and two months on a wide screen. 44 px touch targets apply at 600 px or less, on a phone, or on a touch screen. Map Start Date and End Date in and out of the same variables to keep the range if the screen is re-created. NC Date Range has no Color Map.

Limits

Properties

PropertyAPI nameDefaultDescription
LabelfieldLabel(blank)Question or field label shown above the calendar.
Help TexthelpText(blank)Optional hint under the label.
RequiredrequiredfalseBlock Next until a start and end date are selected.
Required MessagerequiredMessage(blank)Optional. Blank uses the translated default.
DisableddisabledfalseShow the calendar read-only.
Booked RecordsbookedRecords(blank)Optional record collection of booked or blocked periods. Each record needs a start date and an end date (see Start Field and End Field).
Start FieldbookedStartField(blank)Field API name for the start date on each booked record. Blank uses StartDate.
End FieldbookedEndField(blank)Field API name for the end date on each booked record. Blank uses EndDate. The end date is treated as the departure morning, so that day can still be selected.
Blocked DatesbookedDates(blank)Optional comma-separated dates (YYYY-MM-DD) to shade and block, in addition to booked records.
Earliest DateminDate(blank)Optional. Dates before this cannot be selected.
Latest DatemaxDate(blank)Optional. Dates after this cannot be selected.
Minimum NightsminNights1Minimum nights in the range (0 = no minimum). Default 1.
Maximum NightsmaxNights0Maximum nights (0 = no maximum).
Layoutlayoutautoauto (default), one or two. Auto: one month on phones or under 600px, two months on wide screens.
Accent ColoraccentColor(blank)Selected and focus color, e.g. #0B5CAB. Hex, rgb() or a color name. Lightened or darkened until it reaches 3:1 against the tile color (or the theme surface if no tile is set). Also tints the focus ring and the selected/highlighted row. Blank follows the org theme (and dark mode).
Background ColorbackgroundColor(blank)Optional color behind the whole component.
Text ColortextColor(blank)Optional. On choices and results: used as-is on the theme surface, or checked at 4.5:1 against a tile color if one is set. On the label and help: checked at 4.5:1 against the background if one is set; otherwise dark or white text is picked automatically.
Text Sizesizemediumsmall, medium (default), large or xlarge.
Corner Shapeshaperoundedrounded (default), square or pill.
Alignmentalignstartstart (default), center or end.
Navigate After SelectionnavigateOnSelectnonenone (default), next, back, finish or pause. After a complete range is picked the Flow can move on, so you can hide the screen footer buttons. Next and Finish check Required first; Next becomes Finish on the last screen.
Available ActionsavailableActions(blank)Set by Flow; do not map.

Outputs

OutputAPI nameTypeDirectionDescription
Start DatestartDateDateInput and outputSelected start date. Map in to prefill, out to read the choice.
End DateendDateDateInput and outputSelected end date. Map in to prefill, out to read the choice.
NightsnightsNumberOutputNumber of nights between the start and end dates (0 until both are set).

Shared behavior

Layout and width, required messages, colors, navigation, data sources, translations, accessibility, and the setup panel work the same way on every component. See NC screen components.

To copy this component's settings to another screen, use Copy settings at the top of its setup panel. See Copy settings.