-
1 Oct 2009 6:44 AM #71
The problem suddenly resurfaced sometime later. In this case make sure that name and id are different! That is:
Oh, how I hate IECode:{ xtype: 'xdatefield', name: 'period_start', //id: 'period_start', THIS CAUSED THE PROBLEM FROM COMMENT #50 format: 'd/m/Y', submitFormat: 'Y-m-d' }
Ateili-na an-telenei | I don't believe in gods | http://dmitriid.com/
-
2 Aug 2010 1:43 AM #72
The IE switch for the hiddenField in onRender is not at the correct place:
Code:this.hiddenField = this.el.insertSibling({ tag:'input' ,type:'hidden' ,name:name ,value:this.formatHiddenDate(this.parseDate(this.value)) // ----> inserted here }, Ext.isIE ? 'after' : 'before'); this.hiddenName = name; // otherwise field is not found by BasicForm::findField this.el.dom.removeAttribute('name'); this.el.on({ keyup:{scope:this, fn:this.updateHidden} ,blur:{scope:this, fn:this.updateHidden} // ----> removed from here });
-
2 Aug 2010 2:41 AM #73
Thank you for the patch.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
21 Sep 2010 10:59 PM #74
Hi, got a a problem when I use xdatefields in a composite field.
When using [basicform].getValues() either 'undefined' is returned, or '' when I set this as an initial value. A date is never returned.
Any clues?
Thanks in advance
EDIT: Please disregard the above, it's not true. ( It's early here, haven't had enough coffee yet.)
-
6 Oct 2010 12:16 PM #75
Hi Everybody!
I put the extension on my code, but the datefield when posts insists on send data as follow:
Pay attention that JSON field has a T between the date and time. How to remove it from there?Code:data{"fields.start_date":"2010-10-13T00:00:00"}
My code:
Here where I show may date field, this is on a grid:Code:// A new generic date field var datePicker = new Ext.ux.form.XDateField({ format: 'd/m/Y', // Using the european date format submitFormat: 'Y/m/d', minValue: '{% now "d/m/Y" %}' // django implementation (it is ok) })
The date picker is appearing nice and is selecting the date without any problem, but when the system post to the server it claims about the date formatting.Code:{header: "Data InĂcio", width: 100, sortable: true, dataIndex: 'start_date', renderer: Ext.util.Format.dateRenderer("d/m/Y"), editor: datePicker},
Thanks for your help.
Cheers,
-
6 Oct 2010 1:28 PM #76
Is it in grid? If so, there is no reason to use XDateTime as data is not submitted by a form but store itself sends data to server. Editor fields only provide use means to put data in the store, otherwise have nothing to do with submitting.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
30 Nov 2011 8:42 AM #77
In Ext JS 4 I was able to add these configs to my date field and it worked fine for mysql back end:
format: 'm/d/Y',
altFormats: 'Y-m-d',
submitFormat: 'Y-m-d',




Reply With Quote