⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Feb 6, 2026

The scenario

Scheduling and booking applications need future date range presets (Tomorrow, Next Week, Next 30 Days, etc.) in the date picker.

The problem

The DateRangePreset enum only includes past and present presets (Yesterday, Last 7 Days, Last Month, etc.) and there's no built-in way to customize date ranges.

Requested in #1165.

The solution

Add 10 future date range presets that mirror the existing past-facing ones:

New Preset Mirror of
tomorrow yesterday
nextWeek lastWeek
next7Days last7Days
nextMonth lastMonth
nextQuarter lastQuarter
nextYear lastYear
next14Days last14Days
next30Days last30Days
next3Months last3Months
next6Months last6Months
<flux:date-picker mode="range" presets="today tomorrow nextWeek next30Days" />
$this->range = DateRange::tomorrow();
$this->range = DateRange::next30Days();
SCR-20260206-pkxz

Flux Pro: livewire/flux-pro#438
Flux Docs: livewire/flux-docs#148

Fixes #2343

@ju5t
Copy link

ju5t commented Feb 9, 2026

Would it be an option to let people define their own ranges?

@ganyicz
Copy link
Collaborator Author

ganyicz commented Feb 9, 2026

@ju5t This PR only adds future ranges.

I explored the option of making them customizable but the difficulty is that our ranges are defined in both php and javascript which doesn't make for a good customization story if you have to define things in two places. I'd like to explore that in the future again but for now I think this is more likely to get merged.

@ju5t
Copy link

ju5t commented Feb 9, 2026

@ganyicz this is already a big improvement!

@calebporzio calebporzio merged commit c9be1bd into main Feb 9, 2026
@calebporzio calebporzio deleted the filip/future-date-range-presets branch February 9, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Tomorrow" preset to DateRangePreset enum

3 participants