DateRangePicker

Molecule

Two-month popover for picking a start → end date range. Shares the same Calendar core as DatePicker; locale-aware, fully keyboard navigable, with min/max/disabledDates. Pixel-identical React sibling at modules/ui/DatePicker/index.tsx.

Default (TR locale)

Preview
Raporlama dönemi

Bitiş tarihi başlangıçtan sonra olmalı.

Code
<%- include('modules/ui/DateRangePicker', {
  label: 'Raporlama dönemi',
  hint: 'Bitiş tarihi başlangıçtan sonra olmalı.'
}) %>

With value (EN locale)

Preview
Booking window
Code
<%- include('modules/ui/DateRangePicker', {
  label: 'Booking window',
  locale: 'en',
  value: { start: '2026-06-01', end: '2026-06-15' }
}) %>

Required + error

Preview
Campaign dates
Code
<%- include('modules/ui/DateRangePicker', {
  label: 'Campaign dates',
  locale: 'en',
  required: true,
  error: 'Please pick both dates.'
}) %>

Disabled

Preview
Locked range
Code
<%- include('modules/ui/DateRangePicker', {
  label: 'Locked range',
  locale: 'en',
  value: { start: '2026-01-01', end: '2026-01-31' },
  disabled: true
}) %>

Locale: Türkçe + custom messages

Preview
Tatil tarihleri
Code
<%- include('modules/ui/DateRangePicker', {
  label: 'Tatil tarihleri',
  locale: 'tr',
  value: { start: '2026-07-01', end: '2026-07-14' },
  clear_label: 'Temizle'
}) %>
Source modules/ui/DatePicker/DateRangePicker.ejs