I'm struggling to figure out what this does. I have a database field which is a Time variable. I've coded the extjs with a Timefield. Now, Sencha has an issue because the submitFormat does not work, it is sending in a full date/time stamp even though I'm telling it "H:i:s". Maybe that is breaking your API. But when I use API to load the Time field, it is not getting a value, showing "00:00:00", instead of the "14:00:00" I was expecting. What is passed in is something like "2018-11-12T14:00:00". Anything I can do here or do I just need to retrieve as char or date and parse out the time component?
Announcement
Collapse
No announcement yet.
vvIn_time API
Collapse
X
-
Terry,
What version of Ext are you using? I was able to set up an example with Sencha Fiddle that posts two time fields values with the correct format.
Sencha Fiddle - open up developer tools then set the time fields and click submit. You will see a request "testRequest" in the network traffic that is passing the two time values correctly so that you could use vvIn_time.
Example Form
Code:Ext.create('Ext.form.Panel', { itemId: 'myForm', title: 'Time Card', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'timefield', name: 'in', fieldLabel: 'Time In', minValue: '6:00 AM', maxValue: '8:00 PM', increment: 30, anchor: '100%', submitFormat: 'H:i:s' }, { xtype: 'timefield', name: 'out', fieldLabel: 'Time Out', minValue: '6:00 AM', maxValue: '8:00 PM', increment: 30, anchor: '100%', submitFormat: 'H:i:s' }], bbar: [{ text: 'Submit', handler: me.submitForm }] });
Network:
Sencha Fiddle Form Submit.png
-
Well, what the heck Johnny? I'm using the version you ship with Val 5.2, one of the 6 versions. I saw that exact example you used in forum post. What did you do in the store/model field definition? Anything as far as setting type received from server?
Code:header: '<b>Start Time</b>', width: 100, sortable: false, dataIndex: 'PHSTRTM', editor: { xtype: 'timefield', format: 'H:i:s', submitFormat: 'H:i:s', selectOnFocus: true }, renderer: function(val, x, store){ return '<div class="vv-griddescription">' + Ext.util.Format.date(val, 'H:i:s') + '</div>'; }
Comment
Comment