<div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <h5 class="modal-title" id="exampleModalLabel"><?php echo e($pageTitle); ?></h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>

        <?php echo e(Form::open(['method' => 'GET', 'route' => 'home','id' => 'filter-property-form' ])); ?>

        <div class="row col-md-12">
            <div class="form-group col-md-6">
                <?php echo e(Form::label('from_date',__('message.from_date').' <span class="text-danger">*</span>',['class'=>'form-control-label'],false)); ?>

                <?php echo e(Form::date('from_date',$params['from_date'] ?? old('from_date'),[ 'placeholder' => __('message.date'),'class' =>'form-control min-datepicker select2Clear'])); ?>

            </div>
            <div class="form-group col-md-6">
                <?php echo e(Form::label('to_date',__('message.to').' <span class="text-danger">*</span>',['class'=>'form-control-label'],false)); ?>

                <?php echo e(Form::date('to_date', $params['to_date'] ?? old('to_date'),[ 'placeholder' => __('message.date'), 'class' =>'form-control min-datepicker select2Clear'])); ?>

            </div>
        </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-md btn-danger float-right mr-1 clearListPropertynumber text-dark"><?php echo e(__('message.reset_filter')); ?></button>
                <?php echo e(Form::submit( __('message.apply_filter'), [ 'id' => 'apply-order-filter', 'class' => 'btn btn-md btn-primary float-right' ])); ?>

            </div>
        <?php echo e(Form::close()); ?>

    </div>
</div>
<script>
    $(document).ready(function() {
        $('.clearListPropertynumber').click(function() {

            $('#clear-filter-list-data').find('select.select2Clear').val(null).trigger('change');
        });

        $('#apply-order-filter').click(function() {
            $('#filter-property-form').submit(function() {
                $(this).find(':input').filter(function() {
                    return $.trim(this.value) === '';
                }).prop('disabled', true);

                return true;
            });
        });
        if($('.select2Clear').length > 0){
            $(document).find('.select2Clear').select2({
                width: '100%',
                allowClear: true
            });
        }
    });
</script>
<?php /**PATH /www/wwwroot/mxunzo.mimeld.com/resources/views/global/dashboardfilter-datatable.blade.php ENDPATH**/ ?>