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.
i fined the datepicker calender in this page http://keith-wood.name/calendarspicker.html with method how to apply it in page, but there is one steep "nomber 4" not clear"look it down red line". plz illustrative simple example of me.

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'>  
"; ?

what is the wrong hear ?

Steps presented by the author here:
1- Include the jQuery library in the head section of your page.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

2-Download and include the base jQuery Calendars JavaScript in the head section of your page.

<script type="text/javascript" src="js/jquery.calendars.js"></script> 
<script type="text/javascript" src="js/jquery.calendars.plus.js"></script>

3-Download and include the jQuery Calendars Datepicker CSS and JavaScript in the head section of your page.

<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>

4-Connect the calendar functionality to your input field or division/span.

$(selector).calendarsPicker();

[/color][/b]

Note:i Attach all JS and CSS files within a folder page.

thanks to guidance me 🙂

    This is not valid PHP at all and will probably give you a syntax error:

    <?php include <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> ?> 
    

    You are totally mixing up PHP syntax with HTML syntax. You should probably start with a fundamental tutorial about HTML/Javascript and then a fundamental tutorial about PHP. They are very different things.

      Write a Reply...