1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

add datepicker to php textpox

Discussion in 'JavaScript' started by ebrahim1, Oct 26, 2014.

  1. #2
    hi every one
    i am try to include jquery datepicker in simply php page .. sorry but rely i am barely know nothing about the language of php. i try to follow the steps put did not Succeed.
    look it the code plz:
    <?php include <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> ?>
    <?php include <script type="text/javascript" src="js/jquery.calendars.js"></script>   ?>
    <?php include <script type="text/javascript" src="js/jquery.calendars.plus.js"></script>  ?>
    <?php include <link rel="stylesheet" type="text/css" href="css/jquery.calendars.picker.css">   ?>
    <?php include <script type="text/javascript" src="js/jquery.plugin.js"></script>   ?>
    <?php include <script type="text/javascript" src="js/jquery.calendars.picker.js"></script>  ?>
    <?php
    <script>
    
      $(function() {
    
        $( "#datepicker" ).datepicker();
    
      });
    
      </script>
    
    
    ?>
    <?php
    echo "
    <input id='datepicker' name='date1' type='text'>  
    ";
    ?>
    PHP:
    what is the wrong hear ?



    link of datepaker calender http://keith-wood.name/calendarspicker.html There is a way to use
    and what is meant by the author hear:

     
    ebrahim1, Oct 26, 2014 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    You are getting your server side code and your client side code muddled. What you are trying to do is pure javascript

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.calendars.js"></script>
    <script type="text/javascript" src="js/jquery.calendars.plus.js"></script>
    <link rel="stylesheet" type="text/css" href="css/jquery.calendars.picker.css">
    <script type="text/javascript" src="js/jquery.plugin.js"></script>
    <script type="text/javascript" src="js/jquery.calendars.picker.js"></script>
    <script>
    
      $(function() {
    
        $( "#datepicker" ).datepicker();
    
    });
    
    </script>
    
    <input id='datepicker' name='date1' type='text'>  
    Code (markup):
     
    sarahk, Oct 26, 2014 IP
  3. ebrahim1

    ebrahim1 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Mess Please see the attached link to find out what I intend to do
    see under usage title in the page:
    http://keith-wood.name/calendarspicker.html
    thanks
     
    ebrahim1, Oct 27, 2014 IP
  4. ebrahim1

    ebrahim1 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    thanks all and this is the right code :)


    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <link rel="stylesheet" href="jquery.calendars.picker.css">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="jquery.plugin.js"></script>
    <script src="jquery.calendars.js"></script>
    <script src="jquery.calendars.plus.js"></script>
    <script src="jquery.calendars.picker.js"></script>
    <!--<script src="jquery.calendars.picker.ext.js"></script><!-- Include for ThemeRoller styling -->
    <script src="jquery.calendars.ummalqura.js"></script>
    <script>
    $(function() {
    
        var calendar = $.calendars.instance('ummalqura');
        $('#popupDatepicker').calendarsPicker({calendar: calendar});
       
    });
    
    function showDate(date) {
        alert('The date chosen is ' + date);
    }
    </script>
    </head>
    <body>
    
    <p><input type="text" id="popupDatepicker"></p>
    
    </body>
    </html>
    Code (markup):
     
    ebrahim1, Oct 27, 2014 IP