Skip to content

Binded model of datepicker with wire:model.live and date-picker.input is not cleared when using clearable=true #1157

Open
@lucasromanojf

Description

Flux version

v2.0.2

Livewire version

v3.5.20

Tailwind version

v4.0.7

Browser and Operating System

Edge on MacOS

What is the problem?

When using the new date-picker component with wire:model.live and the clearable property, clicking the "clear" (X) button has no effect on the server side. Also clicking the "clear" (X) button opens the calendar like if the calendar button was clicked.

Code snippets

<?php

use function Livewire\Volt\{state};

state('date')->url();

?>

<div>
    <flux:date-picker
        wire:model.live="date"
    >
        <x-slot name="trigger">
            <flux:date-picker.input clearable />
        </x-slot>
    </flux:date-picker>
</div>

How do you expect it to work?

Clicking the "clear" (X) button should not only clear the input value, but also the server-side binded property. Also, it should not open the calendar when clicking it.

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