Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda