Datepicker automatically causing a postback in ASP.NET
See original GitHub issueI use Datepicker with an ASP.NET Web Forms site. Version 1.4.1 worked fine for me but as of 1.5.0 I am noticing the following bug:
If an ASP.NET TextBox with the setting “AutoPostBack=true” is used as the base element for a Datepicker, the datepicker code automatically triggers a page postback, which causes the page to reload, which causes the postback to be triggered, etc. In other words, the page keeps refreshing indefinitely.
It is not easy to make a sample snippet of ASP.NET code but here is how I am creating a textbox:
<asp:TextBox runat="server" ID="rangeStartBox" CssClass="input-small datepicker" AutoPostBack="true"/>
Normally that should trigger a POST only when the textbox is actually changed, but starting in 1.5.0 a POST is triggered every time the Datepicker is initialized.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
jQuery DatePicker goes away after postback. - MSDN - Microsoft
I am using the version 1.8.5 DatePicker on a page in an ASP.Net 3.5 application. It is being used in an Ajax Modal...
Read more >Datepicker automatically causing a postback in ASP.NET
I use Datepicker with an ASP.NET Web Forms site. Version 1.4.1 worked fine for me but as of 1.5.0 I am noticing the...
Read more >asp.net - Boostrap datetimepicker not triggering asp textbox's ...
Isn't that as documented? Use the AutoPostBack property to specify whether an automatic postback to the server will occur when the TextBox control...
Read more >ASP.NET Calendar - Tutorial - Handling postbacks - Obout
By default, calendar doesn't automatically post back when date is selected. To make it post back automatically, set AutoPostback property to true. You...
Read more >JQuery UI inline DatePicker loses selected date after ASP ...
when select date from datepicker the TextChanged for textbox fired and do postback. c# Code behind: protected void txtRDate_TextChanged(objec. t ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed in the upcoming version 1.7.0.
See the commit here: https://github.com/uxsolutions/bootstrap-datepicker/commit/110b12072cf424480a7fe0cd10ec917458a2e4a8
this.fill(); //this.element.change(); return this;
work fine