Skip to content

Commit

Permalink
Add more FlatpickrJS options
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Jul 23, 2024
1 parent 4b4ae4e commit cf92b76
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
29 changes: 19 additions & 10 deletions resources/js/laravel-livewire-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,26 @@ document.addEventListener('alpine:init', () => {
wireValues: wire.entangle('filterComponents.' + filterKey),
flatpickrInstance: flatpickr(refLocation, {
mode: 'range',
clickOpens: true,
altFormat: filterConfig['altFormat'] ?? "F j, Y",
altInput: filterConfig['altInput'] ?? false,
allowInput: filterConfig['allowInput'] ?? false,
allowInvalidPreload: true,
defaultDate: filterConfig['defaultDate'],
ariaDateFormat: filterConfig['ariaDateFormat'],
allowInput: filterConfig['allowInput'],
altFormat: filterConfig['altFormat'],
altInput: filterConfig['altInput'],
dateFormat: filterConfig['dateFormat'],
locale: filterConfig['locale'],
minDate: filterConfig['earliestDate'],
maxDate: filterConfig['latestDate'],
ariaDateFormat: filterConfig['ariaDateFormat'] ?? "F j, Y",
clickOpens: true,
dateFormat: filterConfig['dateFormat'] ?? "Y-m-d",
defaultDate: filterConfig['defaultDate'] ?? null,
defaultHour: filterConfig['defaultHour'] ?? 12,
defaultMinute: filterConfig['defaultMinute'] ?? 0,
enableTime: filterConfig['enableTime'] ?? false,
enableSeconds: filterConfig['enableSeconds'] ?? false,
hourIncrement: filterConfig['hourIncrement'] ?? 1,
locale: filterConfig['locale'] ?? 'en',
minDate: filterConfig['earliestDate'] ?? null,
maxDate: filterConfig['latestDate'] ?? null,
minuteIncrement: filterConfig['minuteIncrement'] ?? 5,
shorthandCurrentMonth: filterConfig['shorthandCurrentMonth'] ?? false,
time_24hr: filterConfig['time_24hr'] ?? false,
weekNumbers: filterConfig['weekNumbers'] ?? false,
onOpen: function () {
window.childElementOpen = true;
},
Expand Down
2 changes: 1 addition & 1 deletion resources/js/laravel-livewire-tables.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf92b76

Please sign in to comment.