Bug Fix: Month Selector and Week Selector #46
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a bug when altInput is true while using monthSelector or weekSelector.
Also, dateFormats are being forced on both, ignoring user's dateFormat().
I implemented a fix using same approach as https://github.com/savannabits/filament-flatpickr/blob/c1a74870e9056988ad001955ac7674c090f11ac0/src/Forms/Components/Flatpickr.php#L141C3-L143
However, this doesn't fix altInput, enabling this option while using weekSelector or monthSelector will make it crash as seen in #45 .
I'll take a deeper look into fixing altInput, as for now this should allow many people to use both features.