Skip to content

Range date picker with allTime preset throws an Exception after selecting other presets #1160

Open
@bzarzuela

Description

Flux version

2.0.2

Livewire version

3.5.20

Tailwind version

^4.0.0

Browser and Operating System

Safari on macOS

What is the problem?

If you tried to select another preset like "Today", it will show this exception.

Image

Code snippets

<?php

use Livewire\Volt\Component;
use Flux\DateRange;

new class extends Component {
    public DateRange $range;

    public function mount(): void
    {
        $this->range = DateRange::allTime('2018-01-01');
    }
}; ?>

<div class="flex">

    {{-- Omitting the `min` attribute produces a 'Min date is required for allTime preset' error in the Console --}}
    <flux:date-picker
        wire:model.live="range"
        mode="range"
        min="2018-01-01"
        with-presets/>

</div>

How do you expect it to work?

I expect the Today preset to be selected.

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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