var mydate = new Date(); //Todays date
txtDate.value='16-Jul-2012'; //date picker date in this format
var newDate = new Date(txtDate.value); //make date object
var difference = Math.ceil((newDate-mydate) / (60*60*24*1000)); //calculate days
if (difference > 7) alert('more than 7 days');
FIDDLE