The defaultValue property is not initialized for the WebDatePicker control. The control is initialized from the code-behind in the page_load event but the element.defaultValue is empty.
We have a generic javascript "form is dirty" implementation that checks if anything has changed in the browser.
This check always return true in the javascript function.
if (type == "hidden" || type == "password" || type == "text" || type == "textarea" || type == "file") { if (element.value != element.defaultValue) { return true; } }
Is there a way to set the defaultValue to the value initalized in the code-behind?
Here is my HTML for the control -
<ig:WebDatePicker ID="StartDateWebDatePicker" runat="server"></ig:WebDatePicker>
I had a similar issue with WebNumericEdit and following was the solution provided by Infragistics support -
http://forums.infragistics.com/forums/p/41919/233653.aspx#233653
But the same does not work for WebDatePicker.
var vs = oEdit.elemViewState;
This line of code fails and returns undefined.