Suppose you have a page called FirstPage with one date field.
After page loaded sucessfully , populated value of this date filed is 03/06/2013 .
Now you click the SecondPage Link without changing any values in FirstPage , but till the popup is comming .
Solution : We have Fixed this issue by changing the jquery.are-you-sure.js file, below is the change code
-------------------------------------------------OLD-----------------------------------------------------------------
var checkForm = function(evt) {
var isFieldDirty = function($field) {
return (getValue($field) != $field.data('ays-orig'));
-------------------------------------------------NEW-----------------------------------------------------------------
var checkForm = function (evt) {
var isFieldDirty = function ($field) {
if ((getValue($field).match(/^\d\d?\/\d\d?\/\d\d\d\d$/)) && ($field.data('ays-orig').match(/^\d\d?\/\d\d?\/\d\d\d\d$/))) {
var getDate = getValue($field).split('/');
var orgDate = $field.data('ays-orig').split('/');
getDate = parseInt(getDate[0], 10) + "/" + parseInt(getDate[1], 10) + "/" + parseInt(getDate[2], 10);
orgDate = parseInt(orgDate[0], 10) + "/" + parseInt(orgDate[1], 10) + "/" + parseInt(orgDate[2], 10);
return (getDate != orgDate);
}
else {
return (getValue($field) != $field.data('ays-orig'));
}
};