-
Sub-task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
we cannot inherit from Time, because this returns a date object ; while we want a string and we cannot override getValue since it is used internally.
what we can do is an abstract field wrapper that will wrap a time and the getValue() will do internalField.getSubmitValue()
do not forget to transmis any configuration.
The declaration is commented for now in plugin.xml "widgets.others.stringhour" feature
Here is a code to start
/** * @cfg {String} format=VeryShortTime Can be "VeryShortTime" to have hours and minutes or "ShortTime" to have seconds additionaly */ config.format = config.format == "ShortTime" ? "ShortTime" : "VeryShortTime"; config = Ext.apply(config, { value: config.value == Ametys.form.widget.Date.CURRENT ? new Date() : config.value, format: Ext.Date.patterns[config.format], submitFormat: config.format == "VeryShortTime" ? "H:i" : "H:i:s" });
A bug in ExtJS prevents the time fields from updating their error message if their validity status hasn't changed or if they didn't receive the 'blur' event.
In this patch we do not use the value of the field in invalidText but a more general message, and we set formatText to '' to avoid an uninternationalized title on the fields.