rawilk / laravel-form-components

Form components built for Tailwind & Livewire.
https://randallwilk.dev/docs/laravel-form-components
MIT License
386 stars 42 forks source link

[Feature Request]: Datepicker working with livewire #63

Closed magarrent closed 1 year ago

magarrent commented 1 year ago

Feature Description

Use datepicker (flatpickr) with livewire (wire:model)

Is this feature valuable for other users as well and why?

No response

rawilk commented 1 year ago

Please read the docs. This is already possible.

magarrent commented 1 year ago

Hey @rawilk ! I don't see it in the docs.

https://randallwilk.dev/docs/laravel-form-components/v7/inputs/date-picker#user-content-basic-usage

I'm trying with wire:model but it doesn't work

rawilk commented 1 year ago

It works just like the other inputs do. I'm not sure what you mean by "doesn't work", but if you have your livewire component set up correctly, a wire:model will work for it.

class MyComponent extends Component
{
    public $myDate;
}

<x-date-picker wire:model="myDate" />