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

175
Vistas
Focusout jquery

i got the label of errore when i excute this as i use a time picker with a form field sharepoint control so

this is my code of jquery validation

    $("input[id*='ffEnTime']").focusout(function () {
        if ($("input[id*='ffEnTime']").val().trim() == "") {
            $("span[id*='lblEntTime']").show();
            $("span[id*='lblEntTime']").text("Write Entry Time");
        }
        else {
            $("span[id*='lblEntTime']").hide();
        }
    }); 

and the code of timepicker that i use

$(document).ready(function () {
    //Start Validation at the after form loaded
    $("input[id*='ffPltNo']").attr("maxlength", "4");
    $("input[id*='ffIDNumber']").attr("maxlength", "10");
    $("input[id*='ffEnTime']").attr("autocomplete", "off");
    $("input[id*='ffEnTime']").attr("readOnly", "true");

    $("input[id*='ffEnTime']").timepicker({
        timeFormat: 'hh:mm p',
        minTime: '06:30:00', // 11:45:00 AM,
        maxHour: 24,
        maxMinutes: 30,
        startTime: new Date(0, 0, 0, 06, 0, 0), // 3:00:00 PM - noon
        interval: 30
    });

so it's look like this See pic

the errore is come because when i click on any time to choose it'll first focus out then the validation will execute finally it'll choose the time in that case i have to chose again to let the label disapper

any suggestions to replace focus out with something better?

I tried on change but doesn't work with me.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Did u try

 $("input[id*='ffEnTime']").on('input',function () {
//your validation function here
})
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