SO - 15481326
by Arun P Johny
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css">
<input id="p1"><input id="p2">
JavaScript
$('#p1, #p2').datepicker();
$('#p1').change(function(){
$('#p2').datepicker('option', 'minDate', $('#p1').datepicker('getDate'))
})