Reputation: 25
I am currently doing a project that includes a calendar which on clicking any date of the year will open another page to fill in certain information. The problem im having is i cant find a basic calendar anywhere with the ability to skip through to a previous or future month and be able to click on a specific date that will go to the page with the info to be entered.
Can anyone help me with a tutorial to build a calendar in javascript or PHP from scratch and has the ability to view previous or future months.
Much Appreciated
Upvotes: 0
Views: 76
Reputation: 1874
Use jquery datepicker and send them to the new page using the datepicker's onSelect method:
$( ".selector" ).datepicker({
onSelect: function (dateText, inst) {
window.location = "/newpage/?date=" + dateText;
}
});
Upvotes: 1