Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
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 Respostas
Responde à pergunta

0

Did u try

 $("input[id*='ffEnTime']").on('input',function () {
//your validation function here
})
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda