0

I am using html and php for creating a website. I have a rental form in html which contains the equipments for rental. Here i am using the php to insert the elemets. I have start date and end date in my form. I want to show the user to pick their dates from the calendar control which means the calendar image will display near to the start date textbox as well as end date. I downloaded the calendar control from the site. now i have the calendar control code, image also. but i don know how to use the things with my html form and php file. i could not display image near to the textbox. please tell me where to i put the calendar control coding and how to use it in a right way. Please help me to validate the start and end date also. Thanks in advance

Veeramani S
  • 1
  • 1
  • 2

1 Answers1

2

Here is JQuery UI Date-Picker (Easiest way):

http://jqueryui.com/datepicker/#icon-trigger

it will put the calender icon (buttonImage)with the code:

<script>
    $(function() {
        $( "#datepicker" ).datepicker({
            showOn: "button",
            buttonImage: "images/calendar.gif",
            buttonImageOnly: true
        });
    });
    </script>

you can download example page source from the above link. Njoy.

Bhavin Rana
  • 1,554
  • 4
  • 20
  • 40