Jump to content

Use birthddate function to make an eventdate function


slykereven

Recommended Posts

Hello everyone,

 

I want to use the birthdate function to make an eventdate function, the problem is you can't choose a date after today because it's a birthday so .... i want the customer to choose a date of an event since today to 1 or 2 years after today ?

If somebody can tell me where i have to apply modification or a hint to make that work !

Thank's a lot :)

Link to comment
Share on other sites

I find the 1st step, in classes/Tools.php

replace

public static function dateYears()
	{
		$tab = array();
		for ($i = date('Y'); $i >= 1900; $i--)
			$tab[] = $i;
		return $tab;
	}

by

public static function dateYears()
	{
		$tab = array();
		for ($i = date('Y'); $i >= date("Y"); $i--)
			$tab[] = $i;
		return $tab;
	}

This delete all the years since 1900 and keep the actual year, now i'm looking to add 2 or 3 years after now like : 2017,2018,2019,2020 and validate in the customer account

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...