thanks for helping in advance. I am just starting out so I may be doing this entirely the wrong way
OK the problem is that the date value 2012, 2, 13 (2012 Feb 13) in PHP when called in the DatePicker is interpreted as 2012 March 13 because 2 means the third month when starting form 0 is March, I got that much.
//Getting the Min Date from the Datetime field
$sqlmin = "Select min(datetime) from table1";
$resultmin = mysql_query($sqlmin);
$mindate = mysql_fetch_array($resultmin);
$datetime1 = date('Y, n, j', strtotime($mindate[0])); //this will give me 2012, 2, 13 (Feb)
Now in the JS part
$(function() {
$( "#fromdate" ).datepicker({
dateFormat: 'yy-mm-dd',
minDate: new Date( php echo $datetime1; ), // this thinks it is March but i want Feb
So the question is how can I get the month to be Feb instead of March in the Datepicker?