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

225
Views
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
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!