Get Jquery calandar date from textbox
-
Dear Experts, I am using Jquery calander control in my project. When i click any button the value in the textbox is cleared. Kindly help me to resolve this issue. I have to take the textbox value and save it in DB. <form id="form1" runat="server"> <asp:Label ID="lblDate" runat="server" Text="Date: "></asp:Label> <asp:TextBox ID="datepicker" runat="server" ReadOnly="true" ViewStateMode="Enabled"></asp:TextBox> <asp:TextBox ID="TextBox1" runat="server" TextMode="Password" ></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" ></form> When i try to get value like string AA = TextBox1.Text; It just returns empty....... <div class="signature">Padmanabhan <u>My Articles:</u> <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=5686247">Articles</a>[<a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=5686247" target="_blank" title="New Window">^</a>] <u>My latest Article:</u> <a href="http://www.codeproject.com/KB/office/Word\_Automation\_Part1.aspx">Word Automation</a>[<a href="http://www.codeproject.com/KB/office/Word\_Automation\_Part1.aspx" target="_blank" title="New Window">^</a>]</div></x-turndown>
-
Dear Experts, I am using Jquery calander control in my project. When i click any button the value in the textbox is cleared. Kindly help me to resolve this issue. I have to take the textbox value and save it in DB. <form id="form1" runat="server"> <asp:Label ID="lblDate" runat="server" Text="Date: "></asp:Label> <asp:TextBox ID="datepicker" runat="server" ReadOnly="true" ViewStateMode="Enabled"></asp:TextBox> <asp:TextBox ID="TextBox1" runat="server" TextMode="Password" ></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" ></form> When i try to get value like string AA = TextBox1.Text; It just returns empty....... <div class="signature">Padmanabhan <u>My Articles:</u> <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=5686247">Articles</a>[<a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=5686247" target="_blank" title="New Window">^</a>] <u>My latest Article:</u> <a href="http://www.codeproject.com/KB/office/Word\_Automation\_Part1.aspx">Word Automation</a>[<a href="http://www.codeproject.com/KB/office/Word\_Automation\_Part1.aspx" target="_blank" title="New Window">^</a>]</div></x-turndown>
first of all, you need to use pre tags around your code. That will make it
look like this and be far more readable to the people who might be willing to help.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. A graduation ceremony is an event where the commencement speaker tells thousands of students dressed in identical caps and gowns that 'individuality' is the key to success
-
first of all, you need to use pre tags around your code. That will make it
look like this and be far more readable to the people who might be willing to help.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. A graduation ceremony is an event where the commencement speaker tells thousands of students dressed in identical caps and gowns that 'individuality' is the key to success
Here is the correct way to write question: I am using Jquery calander control in my project. When i click any button the value in the textbox is cleared. Kindly help me to resolve this issue. I have to take the textbox value and save it in DB.
<script type="text/javascript>
$(function() {
var pickerOpts = {
showOn: "button",
buttonImage: 'calendar.gif',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'dd-M-yy'
};$("#datepicker").datepicker(pickerOpts);
$.datepicker.setDefaults($.datepicker.regional['']);
$("#datepicker").datepicker($.datepicker.regional['en']);
$("#datepicker").val();
});
</script><form id="form1" runat="server">
<asp:Label ID="lblDate" runat="server" Text="Date: ">
<asp:TextBox ID="datepicker" runat="server" ReadOnly="true" ViewStateMode="Enabled">
<asp:TextBox ID="TextBox1" runat="server" TextMode="Password" >
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" ></form>When i try to get value like string AA = TextBox1.Text; It just returns empty.......