-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datepicker automatically causing a postback in ASP.NET #1728
Comments
I have been having the same issue. Setting AutoPostBack="false" prevents the unintentional postback, but you obviously lose AutoPostBack functionality. When an instance of the plugin is created on a field, the plugin's constructor I have worked around this issue as follows: 1) Update bootstrap-datepicker.js by changing line 826 (v1.6.0) from this:
to this:
2) Create and set the variable
After making these changes, I no longer have any unwanted PostBacks, and I have yet to find any negative side-effects. |
Hi Guys, I have the same problem in version 1.6.4. To temporaly solve my problem, i commented the line 802 in bootstrap-datepicker.js: from this:
to this:
I did not see any negative impact on the page. |
Hi, |
You are correct. |
This is fixed in the upcoming version 1.7.0. See the commit here: 110b120 |
this.fill(); work fine |
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 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:
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.
The text was updated successfully, but these errors were encountered: