var dateToday = new Date();
$(document).ready(function() {
$("#checkin").datepicker({
numberOfMonths: 1,
minDate:dateToday,
todayBtn:"linked",
todayHighlight: true,
onSelect:function(selected){
var dt=new Date(selected);
dt.setDate(dt.getDate()+1);
$("#checkout").val(dt.getMonth()+1+"/"+dt.getDate()+"/"+dt.getFullYear());
$("#checkout").datepicker("option","minDate",dt);
}
}) ;
$("#checkout").datepicker({
numberOfMonths: 1,
minDate:dateToday,
todayBtn:"linked",
onSelect:function(selected){
var dt=new Date(selected);
dt.setDate(dt.getDate()-1);
$("#checkin").datepicker("option","maxDate",dt);
}
});
$('.ui-datepicker').addClass('notranslate');
});
$(document).ready(function() {
$("#checkin").datepicker({
numberOfMonths: 1,
minDate:dateToday,
todayBtn:"linked",
todayHighlight: true,
onSelect:function(selected){
var dt=new Date(selected);
dt.setDate(dt.getDate()+1);
$("#checkout").val(dt.getMonth()+1+"/"+dt.getDate()+"/"+dt.getFullYear());
$("#checkout").datepicker("option","minDate",dt);
}
}) ;
$("#checkout").datepicker({
numberOfMonths: 1,
minDate:dateToday,
todayBtn:"linked",
onSelect:function(selected){
var dt=new Date(selected);
dt.setDate(dt.getDate()-1);
$("#checkin").datepicker("option","maxDate",dt);
}
});
$('.ui-datepicker').addClass('notranslate');
});
No comments:
Post a Comment