Jump to content

Year Plus Five??


phpretard

Recommended Posts

This shows the value from 2010 to 1992:

<?php
  $dateAllowedSelect = date('Y') - 18;
  $myCalendar = new tc_calendar("DOB", true);
  $myCalendar->setPicture("images/iconCalendar.gif");
  if (isset($_POST['DOB'])){
	 $expDOB = explode("-", $_POST['DOB']);
	 $myCalendar->setDate($expDOB[2], $expDOB[1], $expDOB[0]);
	  
  }else{
		$myCalendar->setDate(date('d'), date('m'), date('Y'));
  }
  
  $myCalendar->setPath("./");
  $myCalendar->setYearSelect($dateAllowedSelect, date('Y'));
  $myCalendar->dateAllow('$dateAllowedSelect-01-01', date('Y-m-d'));
  $myCalendar->writeScript();
?>

 

This only shows 2010:

 

<?php
  $dateAllowedSelect = date('Y') + 3;
  $myCalendar = new tc_calendar("DOP", true);
  $myCalendar->setPicture("images/iconCalendar.gif");
  if (isset($_POST['DOP'])){
	 $expDOP = explode("-", $_POST['DOP']);
	 $myCalendar->setDate($expDOP[2], $expDOP[1], $expDOP[0]);
	  
  }else{
		$myCalendar->setDate(date('d'), date('m'), $dateAllowedSelect);
  }
  $myCalendar->setPath("./");
  $myCalendar->setYearSelect($dateAllowedSelect, date('Y'));
  $myCalendar->dateAllow('$dateAllowedSelect-01-01', date('Y-m-d'));
  $myCalendar->writeScript();
?>

 

I can't figure the problem.

Link to comment
https://forums.phpfreaks.com/topic/221496-year-plus-five/#findComment-1146585
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.