This means we should be able to select a start date and end date.
Of course, start date should always be before the end date and the end date should always be later than the start date.
Being a Tech Noob, I have no idea how to do this, especially since web programming isn't really my forte.
Fortunately, a lot of helpful tips can be found online!
Here's one.
<input type="text" id="start_date"> <input type="text" id="end_date">
Javascript
$(function() {
$("#start_date").datepicker({
onSelect: function(selected){
$("#end_date").datepicker("option","minDate", selected)
}
});
$("#end_date").datepicker({
onSelect: function(selected) {
$("#start_date").datepicker("option","maxDate", selected)
}
});
});
No comments:
Post a Comment