View | Details | Raw Unified | Return to bug 34226
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (+3 lines)
Lines 242-247 Link Here
242
    </script>
242
    </script>
243
243
244
    [% INCLUDE 'datatables.inc' %]
244
    [% INCLUDE 'datatables.inc' %]
245
    [% INCLUDE 'calendar.inc' %]
245
    [% INCLUDE 'js-patron-get-age.inc' %]
246
    [% INCLUDE 'js-patron-get-age.inc' %]
246
    [% INCLUDE 'js-patron-format.inc' %]
247
    [% INCLUDE 'js-patron-format.inc' %]
247
    [% INCLUDE 'js-patron-format-address.inc' %]
248
    [% INCLUDE 'js-patron-format-address.inc' %]
Lines 430-435 Link Here
430
                            [% CASE 'dateofbirth' %]
431
                            [% CASE 'dateofbirth' %]
431
                            {
432
                            {
432
                                "data": "date_of_birth",
433
                                "data": "date_of_birth",
434
                                "type": "date",
433
                                "searchable": true,
435
                                "searchable": true,
434
                                "orderable": true,
436
                                "orderable": true,
435
                                "render": function( data, type, row, meta ) {
437
                                "render": function( data, type, row, meta ) {
Lines 551-556 Link Here
551
                            [% CASE 'dateexpiry' %]
553
                            [% CASE 'dateexpiry' %]
552
                            {
554
                            {
553
                                "data": "expiry_date",
555
                                "data": "expiry_date",
556
                                "type": "date",
554
                                "searchable": true,
557
                                "searchable": true,
555
                                "orderable": true,
558
                                "orderable": true,
556
                                "render": function( data, type, row, meta ) {
559
                                "render": function( data, type, row, meta ) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-1 / +16 lines)
Lines 564-569 function _dt_default_ajax (params){ Link Here
564
                    let built_value;
564
                    let built_value;
565
                    let is_date_field;
565
                    let is_date_field;
566
566
567
                    if ( col.type == 'date' ) {
568
                        is_date_field = true;
569
                    }
570
567
                    if ( col.datatype !== undefined ) {
571
                    if ( col.datatype !== undefined ) {
568
                        if ( col.datatype == 'date' ) {
572
                        if ( col.datatype == 'date' ) {
569
                            is_date_field = true;
573
                            is_date_field = true;
Lines 893-898 function _dt_add_filters(table_node, table_dt, filters_options = {}) { Link Here
893
                    o.appendTo(select);
897
                    o.appendTo(select);
894
                });
898
                });
895
                $(this).html( select );
899
                $(this).html( select );
900
            } else if (table_dt.settings()[0].aoColumns[i].sType == 'date' ) {
901
                let existing_search = table_dt.column(i).search();
902
                let input = $('<input type="text" class="flatpickr" style="width: 100%" />');
903
                if (existing_search) {
904
                    input.prop("value", existing_search);
905
                }
906
907
                $(this).html( input );
896
            } else {
908
            } else {
897
                var title = $(this).text();
909
                var title = $(this).text();
898
                var existing_search = table_dt.column(i).search();
910
                var existing_search = table_dt.column(i).search();
Lines 923-928 function _dt_add_filters(table_node, table_dt, filters_options = {}) { Link Here
923
            $(this).html('');
935
            $(this).html('');
924
        }
936
        }
925
    } );
937
    } );
938
939
    $(".flatpickr").each(function(){
940
        apply_flatpickr(this);
941
    });
926
}
942
}
927
943
928
944
929
- 

Return to bug 34226