JQuery Calendar Example
A Simple Calendar In html with JQuery using Date Picker.
Code:-
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js">
</script>
<script type='text/javascript'>
$(document).ready(function () {
$("#calendar").datepicker
({
defaultDate: '01/01/' + new Date().getFullYear(),
minDate: '01/01/' + new Date().getFullYear(),
maxDate: '12/31/' + (new Date().getFullYear() + 1),
numberOfMonths: [2, 6],
});
});
</script>
<style>
#header {
background-color:#00ff21;
height:100px;
width:100%;
text-align:center;
}
#footer {
background-color: #808080;
height: 100px;
width: 100%;
color: white;
text-align: center;
}
#calendar {
margin-left:175px;
}
</style>
</head>
<body>
<div id="header">
<h1>Calendar</h1>
</div>
<div id='calendar'>
</div>
<div id="footer">
<h2>All Right are reserved at Dot Net By Vickypedia</h2>
</div>
</body>
</html>
Output :-