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

162
Views
Datepicker duplicate issue javascript

i'm trying to reset datepicker onclick event but click on button datepicker will be duplicate. How to reset datepicker without duplication. Here i'm Initialize datepicker

  function datePicker()
        {

          var datePickerValue =  $('.datepicker-start').val();

            var date = new Date(datePickerValue);
            date.setDate(date.getDate() + 1);


            var dd = date.getDate();
            var mm = date.getMonth() + 1;
            var y = date.getFullYear();

            var newEndDate = y + '-'+ mm + '-'+ dd;


                $('.datepicker-end').datetimepicker({
                    format: 'YYYY-MM-DD',
                    minDate: newEndDate,
                });

        }

this is code for reset datepicker

function reset()
{
    $('#datepicker2').datepicker('setDate', null);
}

here is i call reset function

Close

check that pic

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

jquery datetimepicker can be reset using below line.

$('#input').datetimepicker('reset');
about 4 years ago · Juan Pablo Isaza Report
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!