PHP - Calendar, DatePicker Calendar - Localized version

- Credits go to TJ, the original Calendar Datepicker class developer on http://www.triconsole.com -

Download this multi-language version here - 0 Kb (Last updated on Thu, 01 Jan 1970 00:00)

- Credits go to Ciprian Murariu, with the kind help of phpMyChat-Plus translators, based on 3.2 version TJ's class above -

Here is a plain Romanian Sample! and here is the Sample source

Demo:

Select language :
Can't find your language on this list? Download this template, translate and send it to Ciprian by email!

Fixed Display Style

Date 1 :
  • Set default date to today date (server time)
  • Set year navigate from 1970 to 2020
  • Allow date selectable from 13 May 2008 to 01 March 2015
  • Not allow to navigate other dates from above
  • Disabled Sat and Sun

Code:

<?php
$myCalendar = new tc_calendar("date2");
$myCalendar->SetPicture("images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("./");
$myCalendar->setYearSelect(1970, 2020);
$myCalendar->dateAllow('2008-05-13', '2015-03-01', false);
$myCalendar->disabledDay("sat");
$myCalendar->disabledDay("sun");
$myCalendar->writeScript();
?>

DatePicker Style

Date 2 :
  • Default date set to current date
  • Set year navigate from 1960 to current year
  • Allow date selectable from 01 March 1960 to current date
  • Allow to navigate other dates from above
  • Disabled Sun

Code:

<?php
$myCalendar = new tc_calendar("date1", true);
$myCalendar->SetPicture("images/iconCalendar.gif");
$myCalendar->setDate(date("d"), date("m"), date("Y"));
$myCalendar->setPath("./");
$myCalendar->setYearSelect(1960, date("Y"));
$myCalendar->dateAllow("1960-01-01", date("Y-m-d"));
$myCalendar->disabledDay("sun");
$myCalendar->writeScript();
?>

DatePicker with no input box

Date 3 : 25 July 2025
  • Default date to current server date
  • Set year navigate from 1945 to current year
  • Allow date selectable from 13 May 2008 to today
  • Allow to navigate other dates from above
  • Date input box set to false

Code:

<?php
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->SetPicture("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("./");
$myCalendar->setYearSelect(1945, date('Y'));
$myCalendar->dateAllow('1945-01-01', date('Y-m-d'));
$myCalendar->setDateFormat('***') - auto;
$myCalendar->writeScript();
?>
*** - each language takes it's own format from the localization files

Date Pair Example

Date 4 interval from:
21 July 2025
to
27 July 2025

Code:

<?php					
$myCalendar = new tc_calendar("date3", true, false);
$myCalendar->SetPicture("images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date1)) , date('m', strtotime($date1)) , date('Y', strtotime($date1)));
$myCalendar->setPath("./");
$myCalendar->setYearSelect(1970, 2020);
$myCalendar->setDateFormat('***') - auto;
$myCalendar->writeScript();

$myCalendar = new tc_calendar("date4", true, false);
$myCalendar->SetPicture("images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date2)) , date('m', strtotime($date2)) , date('Y', strtotime($date2)));
$myCalendar->setPath("./");
$myCalendar->setYearSelect(1970, 2020);
$myCalendar->setDateFormat('***') - auto;
$myCalendar->writeScript();
?>
*** - each language takes it's own format from the localization files

© Triconsole (triconsole.com)