F
Filament7d ago
Wbzy

Datetime picker always casting the state to carbon

im using flatpicker package, when using rangepicker the string is like this "2025-11-01 to 2025-11-05" so i get error because carbon cant parse it. is there any work around? this is my code
Flatpickr::make('date')
->label('Periode')
->dateFormat('d-m-Y')
->placeholder('Select Periode')
->rangePicker()
->live()
->hint(new HtmlString(Blade::render('<x-filament::loading-indicator wire:loading wire:target="data.periode" class="w-5 h-5" />')))
->afterStateUpdated(function (Get $get, $state, Set $set) {
dd($state);
Flatpickr::make('date')
->label('Periode')
->dateFormat('d-m-Y')
->placeholder('Select Periode')
->rangePicker()
->live()
->hint(new HtmlString(Blade::render('<x-filament::loading-indicator wire:loading wire:target="data.periode" class="w-5 h-5" />')))
->afterStateUpdated(function (Get $get, $state, Set $set) {
dd($state);
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?