<script src="js/jquery.js"></script> <script src="js/jquery-ui.js"></script><script> $(function() { $('#formBd').datepicker({ showOtherMonths: true, minDate: 0, dateFormat:'yy-mm-dd', dayNamesMin:['S','M','T','W','T','F','S'], onSelect: function(dateText, inst) { $('#from').val(dateText); } }); }); </script> <div id="formBd"></div> <input id="from" type="text" value="">