Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a calender popup window in textbox1 and textbox2. Then when i click the textbox1 the calender get open and after select the date it ll get hide.but i need the same function in tab key ,if i click the tab key calender in textbox1 get open and when i select the date the calender popup ll get close and open the textbox2 calender ans same lik textbox1. Pls help me

Thanks in advance
Posted
Updated 18-Dec-11 19:51pm
v3

Hi priya,

you can do like this

XML
<td>
                                               <asp:TextBox ID="txtclosedt" runat="server" Style="text-align: right;"
                                                   ClientIDMode="Static"></asp:TextBox>
                                           </td>
                                           <td>
                                               <asp:CalendarExtender ID="txtShipmentDate_CalendarExtender" runat="server" TargetControlID="txtclosedt"
                                                   Enabled="True">
                                               </asp:CalendarExtender>  </td>



it will work fine

this ajax extender calender
 
Share this answer
 
v2
Comments
priya from Madras 15-Dec-11 7:14am    
nothing happened
you need to take help of Javascript.
check if TAB key is pressed in Textbox if yes then show popup. here is function

JavaScript
function onTab()
{
  if(event.keyCode == 9) //check for tab key
  {
    //show popup window.open() ot alert()
  }
}

call above function on Textbox keypress event
 
Share this answer
 
v2
Comments
priya from Madras 15-Dec-11 7:14am    
nothing happened
use j query date picker

http://jqueryui.com/demos/datepicker/#default[^]

Eq:

XML
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jQuery UI Datepicker - Default functionality</title>
    <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
    <script src="http://jqueryui.com/jquery-1.6.2.js"></script>
    <script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
    <script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
    <script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>
    <link rel="stylesheet" href="http://jqueryui.com/demos/demos.css">
    <script>
    $(function() {
        $( "#datepicker" ).datepicker();
    });
    </script>
</head>
<body>

<div class="demo">

<p>Date: <input type="text" id="datepicker"></p>

</div><!-- End demo -->



<div class="demo-description">
<p>The datepicker is tied to a standard form input field.  Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay.  Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
</div><!-- End demo-description -->

</body>
</html>
 
Share this answer
 
v3
Pls Let me know the solution , Its Urgent
 
Share this answer
 
v3
Comments
Balakrishnan Dhinakaran 19-Dec-11 3:41am    
display your code

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900