To recreate:
(1) Create a date field in AppGini (make it required or not - makes no difference)
(2) Generate your app and try to select a date prior to 1969 (either via date-picker or dropdown)
Result:
If a required field - Error: DateField is required
If not a required field - records blank date
Thought it might have been some edit I'd made so I created a vanilla app with just 1 x table, 3 fields and zero edits to test. Result was same as above. Appears to be an AppGini issue. Tried to test on AppGini's Northwind demo but I see it's still V5.97 (which doesn't have this issue).
I presume it has to do with this in the V5.98 changelog:
I tried adding the relevant define hook mentioned above. Didn't work.Support for configuring max and min years allowed in date fields via hooks: In hooks/tablename.php or hooks/__global.php, add this in the global scope (outside any function definitions):
// Change tablename and fieldname to actual table and field names
define('tablename.fieldname.MinYear', 2010);
define('tablename.fieldname.MaxYear', 2030);
// Dynamic dates also works:
define('tablename.fieldname.MinYear', date('Y') - 1); // = last year
define('tablename.fieldname.MaxYear', date('Y') + 2); // = 2 years ahead
Currently looking at generated DateCombo.php and date_combo.class.php to see if I can find the cause.
A solution would be very nice as this particular project relies on historical dates and that's proving a problem!