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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    809
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Datepicker Issue

    Hi all,

    I am using a date picker plugin from here:

    http://www.triconsole.com/php/calend...er.php?cPage=1

    In-particular the 'Date Pair Example'

    It works fine in terms of functionality but the input boxes don't show behind the dates like they do on the example! It says if showInput isn't set then the date will display in a panel but it doesn't on mine!

    showInput (bool flag)

    Optional: Set the input box display on/off. If showInput set to false, the date will display in panel as example above 'DatePicker with no input box'. Default value is true

    Ex. $myCalendar->showInput(false);


    I've also tried setting it to false... I know this is 3rd party code but can anyone take a quick peek at what I have and see if I am doing anything wrong?

    PHP Code:
    <?php        
      
    //get class into the page
      
    require_once('calendar/classes/tc_calendar.php');
      
      
    $myCalendar = new tc_calendar("date1"truefalse);
          
    $myCalendar->setIcon("calendar/images/iconCalendar.gif");
          
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
          
    $myCalendar->setDateFormat('d/m/y');
          
    $myCalendar->setPath("calendar/");
          
    $myCalendar->setYearInterval(19702020); 
          echo 
    "<span class=\"bold\">";$myCalendar->writeScript();"</span>";
          echo 
    "&nbsp;&nbsp;&nbsp;to&nbsp;&nbsp;";
      
    $myCalendar = new tc_calendar("date2"truefalse);
          
    $myCalendar->setIcon("calendar/images/iconCalendar.gif");
          
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
          
    $myCalendar->setDateFormat('d/m/y');
          
    $myCalendar->setPath("calendar/");
          
    $myCalendar->setYearInterval(19702020);
          
    $myCalendar->writeScript();
          
    ?>
    Many thanks,

    Greens85

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    What's weird is the guy's example code of a no-input-box datepicker doesn't use showInput(bool), and still shows the input box. And then, the code you posted here doesn't use showInput(bool) either! So maybe you should try actually calling the showInput method...

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    809
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Fumigator View Post
    What's weird is the guy's example code of a no-input-box datepicker doesn't use showInput(bool), and still shows the input box. And then, the code you posted here doesn't use showInput(bool) either! So maybe you should try actually calling the showInput method...
    Hi Fumigator,

    Thanks for the response, not sure if I have misunderstood what you are saying but as I said in my initial post I have tried setting the showInput to false..

    "I've also tried setting it to false... I know this is 3rd party code but can anyone take a quick peek at what I have and see if I am doing anything wrong?"

    I didn't give an example, so perhaps I was just setting it wrong:

    This is what I tried:
    Code:
    $myCalendar->showInput(false);
    and

    Code:
    $myCalendar->showInput(true);
    Note: when set to true, each part of the date is given its own drop down:

    day/month/year

    rather than putting the whole thing in an input box!

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Yes I saw you say that, but then your code didn't have that in there so I was like WTF?


  •  

    Posting Permissions

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