Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / CSS

ASP.NET Calendar Popup without JavaScript

1.22/5 (5 votes)
27 Jun 2011CPOL 17.1K  
Using jQuery, we have a very simple solution for this.Add jQuery and CSS in the head tage and these two lines of JavaScript:<script...

Using jQuery, we have a very simple solution for this.


Add jQuery and CSS in the head tage and these two lines of JavaScript:


XML
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.core.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.tabs.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>

<script type="text/javascript">
$(function () {
$(".datepicker").datepicker();

});
</script>

Then in the form, you need to add the class to the text box:


HTML
<input type=textbox class=datepicker >

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)