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

102
Views
I have problem with datepicker dateDisnable

I hava a problem with use datepicker bootstrap v1.5.0

    var nowTemp = new Date();
 var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
 var checkin = $('.checkin').datepicker({
        todayHighlight:'TRUE',
        autoclose: true,
        beforeShowDay: function(date) {
            return date.valueOf() >= now.valueOf();
        },
        datesDisabled :test,
    }).on('changeDate', function(ev) {
        $(this).datepicker('hide');
        if (ev.date.valueOf() > checkout.datepicker("getDate").valueOf()
            || !checkout.datepicker("getDate").valueOf()) {
            var newDate = new Date(ev.date);
            newDate.setDate(newDate.getDate() + 1);
            checkout.datepicker("update", newDate);
        }

    });
var checkout = $('.checkout').datepicker({
        beforeShowDay: function(date) {
            if (!checkin.datepicker("getDate").valueOf()) {
                return date.valueOf() >= new Date().valueOf();
            } else {
                return date.valueOf() > checkin.datepicker("getDate").valueOf();
            }
        },
        autoclose: true,
        datesDisabled :daylist,
    }).on('changeDate', function(ev) {});

when I choose date of my checkin input, my checkout input not display, but when i press tab and click again, it display and with error enter image description here

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

0

It appears you may have syntax errors:

remove comma ","

datesDisabled :test,

datesDisabled :test

and also here:

datesDisabled :daylist,

datesDisabled :daylist

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!