Click here to Skip to main content
16,019,140 members
Articles / Web Development / CSS
Alternative
Tip/Trick

ASP.NET Calendar Popup without JavaScript

Rate me:
Please Sign up or sign in to vote.
1.22/5 (5 votes)
27 Jun 2011CPOL 17.1K   2   5
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)


Written By
CEO M & L Services
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Thomas Daniels21-May-13 7:02
mentorThomas Daniels21-May-13 7:02 
GeneralReason for my vote of 1 jQuery is javascript, while the purp... Pin
Eaverae4-Jul-11 20:35
Eaverae4-Jul-11 20:35 
Reason for my vote of 1
jQuery is javascript, while the purpose was to do this without javascript.
GeneralReason for my vote of 5 test Pin
Ragunathan Maniraj30-Jun-11 0:48
Ragunathan Maniraj30-Jun-11 0:48 
GeneralReason for my vote of 1 It's Javascript Pin
charles henington28-Jun-11 6:07
charles henington28-Jun-11 6:07 
GeneralReason for my vote of 1 I hate to break it to you, but jQuer... Pin
AspDotNetDev27-Jun-11 10:24
protectorAspDotNetDev27-Jun-11 10:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.