How do I set the FlatPicker Value via Set (laravel 11, Filament 3) #121
Unanswered
edbpadilla
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have this code :
Flatpickr::make('ata_origin_2')
->label('Test')
->time(true)
->allowInput(true)
->seconds(false)
->displayFormat('Y-m-d H:i:s')
->format('Y-m-d H:i:s')
//->nullable()
->suffixAction(
Action::make('setNow')
->icon('heroicon-o-clock')
->label(false)
->action(function (Livewire $livewire, Component $component) {
Notification::make()
->title('Button Clicked!')
->success()
->send();
$now = now()->format('Y-m-d H:i:s');
$livewire->dispatch(
'set-flatpickr-time',
id: $component->getId(),
statePath: $component->getStatePath(),
date: $now
);
})
),
Beta Was this translation helpful? Give feedback.
All reactions