Pages

Ads 468x60px

.

Featured Posts

Saturday, 19 April 2014

Simple Drop Down Menu with Jquery and CSSu
Categories :- Jquery,Simple Drop Down Menu with Jquery and CSS

Introduction:-  In my previous article i have explained Simple Drop Down Menu with Jquery and CSS.
 In this article i am explain how we can use datetime picker in our project using asp.net.How to display or show the JQuery UI Date picker control when click on textbox in asp.net.

Description:- In my previous post i have explained so many article related to jQuery.Now in this article i am explain how to show JQuery UI Calenar control when user click on textbox using asp.net.

Step 1 :- First open Visual Studio and create new website and write click on solution explorer add new Item
Step 2 :- Select new asp.net webpage and give a name like(datetimepicker.aspx) and click ok.
Step 3 :- Open your .aspx design page and include the .css and .js file  within <head></head>



<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>

Step 4:- Write a javascript JQuery Funtion like this.
Note : -Here txtDate is textbox id of asp.net text box control

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

Step 5:- Write a style for set the font of the date time picker.

<style type="text/css">
.ui-datepicker { font-size:8pt !important}
</style>

Output as shown below

Download sample code attached

 datetimepicker in c#

 

..

New Updates

Related Posts Plugin for WordPress, Blogger... View My Stats

Related Result