...

View Full Version : jquery datepicker with php variable issue:



coding_begins
03-06-2012, 04:48 AM
Can someone please tell me how I can make the datepicker pick a date that is after a certain date I choose.

<script type="text/javascript">

$(document).ready(function() {
$( "#date" ).datepicker({ minDate: new Date(<?php echo $split_date[2];?>, <?php echo $split_date[0] - 1;?>, <?php echo $split_date[0];?>)});
});
</script>

<?php

/* I am trying to get the date from a dynamic php variable. For eg: */
$date='03/08/2011';
$split_date=explode("/",$date);
echo $split_date[0];
echo $split_date[1];
echo $split_date[2];
?>

but nothing i tried so far works!

devnull69
03-06-2012, 06:52 AM
You are using $split_date[0] twice while not using $split_date[1]. Typo?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum