Widgets

DateRangePicker

DateRangePicker

DateRangePicker control. Build it with the date_range_picker helper.

Example

date_range_picker(
  open: true,
  expand: true,
  on_change: ->(event) {}
)

Properties

  • adaptive — Adapts to the platform (Material/Cupertino) when true.
  • barrier_color — Barrier color.
  • cancel_text — Cancel text.
  • confirm_text — Confirm text.
  • current_date — Sets the current date property.
  • end_value — Sets the end value property.
  • entry_mode — Sets the entry mode property.
  • error_format_text — Error format text.
  • error_invalid_range_text — Error invalid range text.
  • error_invalid_text — Error invalid text.
  • field_end_hint_text — Field end hint text.
  • field_end_label_text — Field end label text.
  • field_start_hint_text — Field start hint text.
  • field_start_label_text — Field start label text.
  • first_date — Sets the first date property.
  • help_text — Help text.
  • keyboard_type — On-screen keyboard type (e.g. number, email).
  • last_date — Sets the last date property.
  • locale — Sets the locale property.
  • modal — Sets the modal property.
  • open — Whether the control (dialog/sheet/menu) is open.
  • save_text — Save text.
  • start_value — Sets the start value property.
  • switch_to_calendar_icon — Switch to calendar icon.
  • switch_to_input_icon — Switch to input icon.

Common layout and animation properties

  • badge — Badge drawn on the corner of the control.
  • col — Responsive column span (1-12) per breakpoint.
  • data — Arbitrary value you can attach to the control and read back in handlers.
  • disabled — Disables interaction when true.
  • expand — Fills the available space along the parent's main axis when true.
  • expand_loose — Like expand, but only grows up to the child's natural size.
  • key — Stable identity used to preserve state across rebuilds.
  • opacity — Opacity from 0.0 (transparent) to 1.0 (opaque).
  • rtl — Renders right-to-left when true.
  • tooltip — Text shown on hover/long-press.
  • visible — Hides the control when false.

Events

  • on_change — Fired when the value changes.
  • on_dismiss — Fired when the control is dismissed.

Reference

  • Family: materials
  • Widget type: daterangepicker
  • Helpers: date_range_picker, daterangepicker