What happened?
Hello,
I found that using a range picker with some locales throws an error due to the rangeSeparator for the locale being different from the one used on src/Forms/Components/Flatpickr.php:224 when exploding the string:
if ($component->isRangePicker()) {
$range = str($state)->explode(' to ');
} elseif ($component->isMultiplePicker()) {
$range = str($state)->explode($component->getConjunction());
} else {
$range = [$state];
}
I've been checking and it seems pretty difficult to extract the separator from the locale, so maybe a quick hack might be to add a function to let the dev specify the separator.
How to reproduce the bug
Flatpickr::make('fechas')
->rangePicker()
->showMonths(2)
->displayFormat('d/m/Y')
->locale('es')
Package Version
v4.1.0
PHP Version
8.4
Laravel Version
11 - 12
Which operating systems does with happen with?
No response
Notes
No response
What happened?
Hello,
I found that using a range picker with some locales throws an error due to the
rangeSeparatorfor the locale being different from the one used on src/Forms/Components/Flatpickr.php:224 when exploding the string:I've been checking and it seems pretty difficult to extract the separator from the locale, so maybe a quick hack might be to add a function to let the dev specify the separator.
How to reproduce the bug
Package Version
v4.1.0
PHP Version
8.4
Laravel Version
11 - 12
Which operating systems does with happen with?
No response
Notes
No response