Click here to Skip to main content
15,886,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have two textboxes with calendar extendar control (txt1-StartDate,txt2-Enddate).

When i focus move out from the second txt2, i want to calculate the years and months.

What is the event need to use when i move out the foucus from the second text box.
because, currently it's not firing anything.

see code
XML
<td align="left" class="Labels" width="45%">
Project Start Date :
  <asp:
TextBox ID="txtStartdate" runat="server" class="controltext" Width="15%"> <AjxTool:
CalendarExtender ID="CalendarExtendar1" runat="server" Enabled="true" TargetControlID="txtStartdate" ¬
Format="dd-MMM-yyyy">    Week-Year :
  <asp:
Label ID="lblStWkYr" runat="server" class="controltext" Width="15%">
</td>
<td align="left" class="Labels" width="45%">
Project End Date :
<asp:
TextBox ID="txtEndDate" runat="server" class="controltext" Width="15%"> <AjxTool:
CalendarExtender ID="CalendarExtender2" runat="server" Enabled="true" TargetControlID="txtEndDate" ¬
Format="dd-MMM-yyyy">    Week-Year :
  <asp:
Label ID="lblEdWkYr" runat="server" class="controltext" Width="15%">
</td>
Posted
Updated 24-Jul-11 18:53pm
v3
Comments
Parwej Ahamad 25-Jul-11 0:52am    
are you using this code inside the update panel?

1 solution

Hi,
you can use javascript on focusout event,
regards,
shefeek
 
Share this answer
 
Comments
gani7787 25-Jul-11 1:00am    
Thanks. it's working. I have given autopostback=true.
Parwej Ahamad 25-Jul-11 1:02am    
where you have put Autopostback=true?
Parwej Ahamad 25-Jul-11 1:01am    
If we are using Ajax to popup Calendar then why we need javascript? It's mean there is no use of Ajax. Because Ajax Calendar control does this thing it self I guess not need to write anything addition javascript code for the same.

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