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

184
Views
Dar formato a los resultados de bootstrap datetimepicker v4

Estoy usando el siguiente código:

 $(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(); } }); });

Los resultados filtrados están bien, pero se muestran sin CSS y los encabezados de la tabla original desaparecen. Soy nuevo en javascript. ¿Hay alguna forma de formatear/aplicar css a los resultados?

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

0

Solo para el propósito de esta pequeña función, obtuve los resultados filtrados por el método '.filter ()' y mantuve todo con el estilo de la tabla original simplemente cambiando el 'área' de acción del método de filtro, en otras palabras i cambié el id ('#myTable') por el id del cuerpo de mi tabla, he aprendido a usar 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!