I try to make a date picker where you can only choose dates from 8 days left. If we have the date 09 / 05-2015 you can not select (8,7,6,5,4,3,2) but you can choose the 01 / 05-2015 and go down. How can i make that?
$(document).ready(function() {
$(".date-picker").datepicker({
todayHighlight: true,
});
$(".date-picker").datepicker().datepicker("setDate", new Date()); //sets the todays date in the input field
$(".date-picker").on("change", function () {
var id = $(this).attr("id");
var val = $("label[for='" + id + "']").text();
$("#msg").text(val + " changed");
});
}); // end of document ready
Aucun commentaire:
Enregistrer un commentaire