Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
Format results from bootstrap datetimepicker v4

I am using the following code:

$(document).ready(function () {   
    
            $('#myInput').datetimepicker({
                format: 'YYYY-MM-DD',
                
            });

            $('#myInput').on('dp.change', function (e) {
                var rex = new RegExp($(this).val(), "i");
            $("#actividades_curso tr").hide();
            $("#actividades_curso tr").filter(function () {
                return rex.test($(this).text());
            }).show();
            $(".noResults").hide();
            if ($("#actividades_curso tr:visible").length == 0) {
                $(".noResults").show();
            }
            });  
        });

The filtered results are ok but are shown without any css and the original table headers are gone. I'm new to javascript. Is there a way to format/apply css to the results?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just for the purpose of this small function i got the results filtered by the '.filter()' method and keep everything with the style of the original table by just changing the 'area' of action of the filter method, in other words i changed the id ('#myTable') for the id of the body of my table, i have learnt to use fiddle js.

$('#ohbudy tr').filter( function(){ return rex.test($(this).text()); }).show();

https://jsfiddle.net/e6g1ucvn/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!