[Bug]: Extra @endphp in DateRangeFilter blade
Traqza opened this issue · 6 comments
What happened?
When using this filter I get a @endphp tag, and out of scope view for the filter menu.
I can tab through and locate them, but the icon overtakes.
How to reproduce the bug
DateRangeFilter::make('Date Range')
->config([
'allowInput' => true, // Allow manual input of dates
'altFormat' => 'Y/m/d', // Date format that will be displayed once selected
'ariaDateFormat' => 'Y/m/d', // An aria-friendly date format
'dateFormat' => 'Y/m/d', // Date format that will be received by the filter
'earliestDate' => '2020/01/01', // The earliest acceptable date
'latestDate' => Carbon::now()->format('Y/m/d'), // The latest acceptable date
])
->setFilterPillValues([0 => 'minDate', 1 => 'maxDate']) // The values that will be displayed for the Min/Max Date Values
->filter(function (Builder $builder, array $dateRange) { // Expects an array.
$builder
->whereDate('start_timestamp', '>=', $dateRange['minDate']) // minDate is the start date selected
->whereDate('end_timestamp', '<=', $dateRange['maxDate']); // maxDate is the end date selected
}),
Package Version
v3.0.0-beta.1
PHP Version
None
Laravel Version
10.12.0
Alpine Version
No response
Theme
Bootstrap 5.x
Notes
No response
Error Message
No response
Thanks. Not sure how this one worked its way back in as did address it before.
Will fix this evening.
#1394 should fix this, will be in v3-develop shortly, tested briefly, then moved across and hopefully into a v3.0.0-beta.2 tomorrow.
This is in v3-develop now., and will go through the pipeline into v3-master, then a release.
Hoping to group any other bugs highlighted and do one release tomorrow to address those other items.
Will give it another test in bootstrap 5, can you confirm the exact bootstrap 5 version you are using please so that I can match precisely
This is in beta 3 I believe!