Skip to content

mo.ui.date_range default value can fall outside its declared start/stop range #10648

Closed

Description

@winklemad

Describe the bug

mo.ui.date_range produces a default value outside its own declared [start, stop] range when only one bound is given, unlike its mo.ui.date / mo.ui.datetime siblings which clamp correctly.

import marimo as mo, datetime as dt

# sibling clamps correctly:
mo.ui.date(start="2030-01-01").value          # date(2030, 1, 1) — in bounds

# date_range ignores the supplied bound:
mo.ui.date_range(start="2030-01-01").value    # (today, today) — BEFORE start
mo.ui.date_range(stop="2000-01-01").value     # (today, today) — AFTER stop

When exactly one of start/stop is provided and no explicit value, date_range falls back to (today, today) and ignores the bound, so the widget initializes out of its own range (and the None-value path skips the bounds validation the sibling widgets run).

Expected behavior

date_range should clamp its default to the supplied bound, matching date/datetime: start="2030-01-01" → (2030-01-01, 2030-01-01), stop="2000-01-01" → (2000-01-01, 2000-01-01).

Environment

marimo main; platform-independent.

Activity

  1. self-assigned this
    on Aug 25, 2026
  2. added a commit that references this issue on Sep 10, 2026
    0336d5c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions