im having a hard time in inserting the selected date date in date picker when im selecting earlier year the value that inserting to my data base is the current date
heres my code
bdate
<link href="jqueryui/css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<script src="jqueryui/js/jquery-1.9.1.js"></script>
<script src="jqueryui/js/jquery-ui-1.10.3.custom.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-50:-1",
dateFormat: 'yy-mm-dd',
defaultDate: '01-01-1950'
});
});
</script>
<style>
/*datepicker hack*/
#ui-datepicker-div { font-size: 12px; }
</style>
<tr>
<td>Birthday*</td>
<td><input id="datepicker" name="bdate" <?php if(isset($bdate)){ echo 'value="'.$bdate.'"';}?> /></td>
</tr>
thanks