By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

How to insert date value into a date type field using ajax calender extender

P: 1
I want to insert the date into a date type field.My calnder extender format is "dd/mm/yyyy" and my system date format is "mm/dd/yyyy".
when date is less than 13th of any month then data inserted successfully but when date is greater than 12 the i got an error.
cs code
Expand|Select|Wrap|Line Numbers
  1. DateTime.Parse(txtvdate.Text).ToString("yyyy-MM-dd")
Expand|Select|Wrap|Line Numbers
  1.  <asp:TextBox ID="txtvdate" runat="server" CssClass="textb" MaxLength="15" Width="150px"></asp:TextBox>
  2.                             <ajaxToolkit:CalendarExtender ID="vdate" runat="server" 
  3.                                 TargetControlID="txtvdate" Format="dd/MM/yyyy" Enabled="True">
  4.                             </ajaxToolkit:CalendarExtender>
May 10 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.