Using 5.31
If you find the range of years is too long it is easy to change.
Look in yourtablename_dml.php
Find all instances, in fields which are date fields, of MInYear = ???? and MaxYear = ????
Change the min year and max year to what you wish and this will give a much shorter possible date range. I run a program which changes all of these at one time for me.
Here is an example
$combo_date_of_game->MinYear = 2014;
$combo_date_of_game->MaxYear = 2016;
Alan
Year range too long?
Year range too long?
Calgary, Alberta, Canada - Using Appgini 5.50 -
Re: Year range too long?
Nice tip, thanks
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: Year range too long?
Shasta, you said you wrote a program to change all maxYear together... I'm interested!
I'm looking for something similar in the hooks section, but I think that hooks don't help in this matter.
It seems to me that the system has a "global constant" maxYear = 2100, and it would be very useful to access to it and change it, for example to maxYear = date("Y") (the current year). But this customization should be in the AppGini preferences.
Can you give me some idea on how to change all maxYear?
Thank you!
I'm looking for something similar in the hooks section, but I think that hooks don't help in this matter.
It seems to me that the system has a "global constant" maxYear = 2100, and it would be very useful to access to it and change it, for example to maxYear = date("Y") (the current year). But this customization should be in the AppGini preferences.
Can you give me some idea on how to change all maxYear?
Thank you!
Re: Year range too long?
I found another way: modify date_combo.class.php, introduce a variable:
$this->MaxYear_custom = date("Y");
instead of
$this->MaxYear = 2100;
and replace $this->MaxYear in the rest of the file.
Then set date_combo.class.php as a read-only file, to keep the modification when regenerating the project.
It works!
You just have to remember to use this new custom variable in table_dml.php, in case you want to change the max year in that specific table view.
$this->MaxYear_custom = date("Y");
instead of
$this->MaxYear = 2100;
and replace $this->MaxYear in the rest of the file.
Then set date_combo.class.php as a read-only file, to keep the modification when regenerating the project.
It works!
You just have to remember to use this new custom variable in table_dml.php, in case you want to change the max year in that specific table view.