excuse me, do you know how to put a calendar in the form?
I try to put this code in my form but it has an error on line 2.
Anybody know? Please help me. Thank you

This is the calendar code :-

<?php
      $myCalendar = new tc_calendar("date5", true, false);
      $myCalendar->setIcon("calendar/images/iconCalendar.gif");
      $myCalendar->setDate(date('d'), date('m'), date('Y'));
      $myCalendar->setPath("calendar/");
      $myCalendar->setYearInterval(2000, 2015);
      $myCalendar->dateAllow('2008-05-13', '2015-03-01');
      $myCalendar->setDateFormat('j F Y');
      $myCalendar->setAlignment('left', 'bottom');
      $myCalendar->setSpecificDate(array("2011-04-01", "2011-04-04", "2011-12-25"), 0, 'year');
      $myCalendar->setSpecificDate(array("2011-04-10", "2011-04-14"), 0, 'month');
      $myCalendar->setSpecificDate(array("2011-06-01"), 0, '');
      $myCalendar->writeScript();
?>

sorry for the typo at a title above.
What I was meant is 'put', not 'pun'

Member Avatar for diafol

You're using a calendar class - we don't know which one. Have you read the documentation? You do not state what the error is. Help us to help you.

why not used jquery ui?

Do you have this in your code..

require_once('calendar/classes/tc_calendar.php');

You need to insert the class for the Calender before using it.

You can look at this site for more information about how to use the calendar

http://www.triconsole.com/php/calendar_datepicker.php

Member Avatar for diafol

That site does indeed look like the source of the class - and a nice datpicker it is too - much nicer looking than the jquery ui one.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.