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

227
Visualizações
jQuery date time picker not working while changing the timer

datetimepicker is not working

I have a website where if the user clicks the button, then the timer which displays in the UI will get changed by 20 minutes, but when I do that it is not working.

Here is my code:

Function called while clicking the button.

I done this by removing previous timer class and added new timer class for increasing the timer.

function check(element) {
 (('input[name$="timer[[1]]"').addClass('increaseTimer').removeClass('inputTimer'));
}

My input element:

enter image description here

Input timer code:

$(".increaseTimer").datetimepicker({
  ignoreReadonly:true,
  format: 'LT',
  defaultDate: genDate()+' 00:20'
});

Increase timer code:

$(".inputTimer").datetimepicker({
  ignoreReadonly:true,
  format: 'LT',
  defaultDate: genDate()+' 00:00'
});

While inspecting, the class name has been changed but it doesn't change the timer in the UI, but the same code works if I removed the inputtimer from the input type like this:

enter image description here

after that when I click the button then it calls the increase timer function and increases the timer by 20.

So what is wrong in my code?

about 4 years ago · Juan Pablo Isaza
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