<?php $myCalendar = new tc_calendar("date1", true); $myCalendar->setIcon("calendar/images/iconCalendar.gif"); $myCalendar->setDate(01, 03, 1960); $myCalendar->setPath("calendar/"); $myCalendar->setYearInterval(1960, 2015); $myCalendar->dateAllow('1960-01-01', '2015-03-01'); $myCalendar->setSpecificDate(array("2011-04-01", "2011-04-13", "2011-04-25"), 0, 'month'); $myCalendar->setOnChange("myChanged('test')"); $myCalendar->writeScript(); ?> <html> <head> <script language="javascript"> < !-- function myChanged(v){ alert("Hello, value has been changed : "+document.getElementById("date1").value+"["+v+"]"); } //--> </script> </head> </html>
<td> <?php // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com $myCalendar = new tc_calendar("date1", true); $myCalendar->setIcon("calendar/images/iconCalendar.gif"); $myCalendar->setDate(date('d'), date('m'), date('Y')); $myCalendar->setPath("calendar/"); $myCalendar->zindex = 150; //default 1 $myCalendar->setYearInterval(1995, date('Y')); $myCalendar->dateAllow('1960-03-01', date('Y-m-d')); //$myCalendar->autoSubmit(true, "calendar"); //$myCalendar->setDateFormat('l, dS \of F Y'); $myCalendar->disabledDay("sat"); $myCalendar->disabledDay("sun"); $myCalendar->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); $myCalendar->setSpecificDate(array("2011-04-01"), 0, 'year'); $myCalendar->setAlignment('right', 'bottom'); //optional $myCalendar->writeScript(); ?> </td> <tr/> </table> </form> Rest of your page body content <br /> [...] <br /><br /> <a href="sample.txt" target="blank">View page source</a> </body>
<form enctype="multipart/form-data" class="form-horizontal" method="post"> <div class="control-group"> <label class="control-label" for="inputEmail">Date Issue:</label> <div class="controls"> <?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, 2030); $myCalendar->dateAllow('2008-05-13', '2020-03-01'); $myCalendar->setDateFormat('F j, Y'); $myCalendar->setAlignment('left', 'bottom'); $myCalendar->setSpecificDate(array("2011-06-01"), 0, ''); $myCalendar->writeScript(); ?> <script type="text/javascript"> var datepick=$("#container_date5").text(); $('#dateput').html("<input type='hidden' name='date' value='"+datepick+"'"); </script> </div> </div> <div class="control-group"> <label class="control-label" for="inputEmail">Name:</label> <div class="controls" > <input type="text" class="span4" id="inputEmail" name="magazine_name" placeholder="Magazines/ Newspaper " required><span id="dateput"></span> </div> </div>