<!-- Date Range scope -->
<a
    class="filter-scope-date range <?= isset($after) || isset($before) ? 'active' : '' ?>"
    href="javascript:;"
    data-scope-name="<?= $scope->scopeName ?>"
    data-scope-data="<?= e(json_encode([
        'dates' =>  [isset($after) ? $after : null, isset($before) ? $before : null],
        'minDate' => $scope->minDate ? $scope->minDate : '2000-01-01',
        'maxDate' => $scope->maxDate ? $scope->maxDate : '2099-12-31',
    ]))
    ?>">
    <span class="filter-label"><?= e(trans($scope->label)) ?>:</span>
    <span class="filter-setting"><?= isset($afterStr) && isset($beforeStr) ? ($afterStr . ' → ' . $beforeStr) : e(trans('backend::lang.filter.date_all')) ?></span>
</a>
