You can use the data to store the previously saved value and compare the current value with it.
Try this (put these statements in a document ready event):
$('#Milestone').data("prev", $(this).val()); $('#Milestone').datepicker({ dateFormat: 'dd M yy', onSelect: function(dateText){ var prevDate = $(this).data("prev") var curDate = dateText; if(prevDate == curDate){ $(this).data("prev", curDate) calcUpdate(); } } });
source share