I have a problem, with the DatePicker.
Basically, I only want it enabled, if a checkbox is checked (Default is disabled).
If I set the DatePicker to disabled, I have a problem with saving the TextBox value, across postbacks. So, I have to set the datepicker as enabled, when the page loads.
My idea, as a work-around, was to set min/max date to negatives, meaning you cannot pick any dates. The DatePicker will still appear, but at least a date cannot be picked. The problem though, is how do I remove my min/max settings again (when the checkbox is clicked), to enable selection again?
Also, are there any other way to suppres the DatePicker?
I don’t really know what code I can possibly post, but this is my DatePicker constructor:
$("#<%= txtReleasedDate.ClientID %>").datepicker({ dateFormat: 'yy-mm-dd', minDate: -1, maxDate: -2 });
What I would like, is a way to remove minDate and maxDate from it again.
After getting a hold of my local, jquery expert, he suggested that I read the documentation, where it clearly said, that you could set minDate to null. Oops..