Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2011
    Posts
    134
    Thanks
    20
    Thanked 0 Times in 0 Posts

    jquery datepicker with php variable issue:

    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!

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,355
    Thanks
    11
    Thanked 558 Times in 551 Posts
    You are using $split_date[0] twice while not using $split_date[1]. Typo?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •