Date field properties
Author: jenny.sandqvist@adm.umu.se (JennySandqvist)
I have a problem with date fields. Up until now we have allowed two different ways of typing dates, yymmdd and yyyy-mm-dd, but now we have decided to allow a third way of typing, yyyymmdd. The data type in the field is Date and the widget type is EditBox. We use a template in the Syntax Field Property that in shorthand terms reads: ENT((yymmdd) (yyyy-mm-dd)), MUL.
When typing yyyymmdd the date gets all mixed up, for example if I type 20110621 (June 21 2011) it becomes 20211106 (November 6 2021). We can of course fix it with code in the deformat trigger, but since date fields are used in hundreds of forms we are hoping to be able to fix the problem just by changing the template for the (Syntax) Field Property.
If I remove the ENT(yymmdd) (and just keep ENT(yyyy-mm-dd)) I can type yyyymmdd and yyyy-mm-dd, but not yymmdd (it gets mixed up).
If I use ENT(ymd) or ENT(yymmdd) I can type yymmdd and yyyymmdd, but not yyyy-mm-dd (the on-error trigger gets activated).