hi :)
is there anyone who knows how to add a datepicker when you click the textbox? or pop up a datepicker when you click the textbox and when you click a date in datepicker it will pass the selected date to the textbox???
pls.

thanks in advance :)

Recommended Answers

All 4 Replies

Create a new form, make it boarderless and the exact size of the date picker. Add a date picker to it. In the TextBox.Click event, open the form in and let them pick a date. Take the date from the form and put it in the textbox.

Write some code, we don't write code for you (you don't pay me enough).

i use jquery to a datepicker but my code doesn't work.here's my code:

<head runat="server">
<link rel="Stylesheet" type="text/css" href="styles/jquery.datepick.css"></link>  
<link rel="Stylesheet" type="text/css" href="styles/style.css"></link>   
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>  
<script type="text/javascript" src="scripts/jquery.datepick.js"></script>   
<script type="text/javascript">    
    $(function() {         
        $('#startdate').datepick({ dateFormat: 'dd/mm/yyyy' });      
        $('#enddate').datepick({ dateFormat: 'dd/mm/yyyy' });    
    });      
</script>
</head>

<body>   
<form id="form1" runat="server">
<div id="content">     
From <asp:TextBox ID="startdate" class="field" runat="server">
</asp:TextBox> 
-        To
<asp:TextBox ID="enddate" class="field" runat="server"></asp:TextBox> 
</div>   
</form>
</body>

tnx

Try googling "datetimepicker in asp"

thanks for the responses and solution :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.