JQuery Calendar
In the Master page head section:
*************************
<script src="../Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
<link href="../css/ui-lightness/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />
*****************
In the ContentPlaceHolder on Content Page:
**********************************
<script type="text/javascript" language="javascript">
$(document).ready(DocReady);
function DocReady()
{
var DatePicker = $('#ctl00_cphMiddlePlace_txtDob').datepicker();
DatePicker.datepicker('option',
{
showOn: "both",
buttonImage: "../images/cal.jpg",
buttonImageOnly: true,
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
yearRange: "-50:+0",
// numberOfMonths: 2
maxDate : new Date(),
});
}
</script>
***************************************
On Asp.Net Page:
***************
<asp:TextBox ID="txtDob" runat="server" Width="170px" MaxLength="50"></asp:TextBox>
-----------------------------------------------------------------------------------------------
0 comments:
Post a Comment