-
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" });