1. #71

    Default


    Quote Originally Posted by Illiarian View Post
    This may come in very late, but still.

    Comment #37 (about IE not liking duplicate names) may solve the issue in comment #50 (about XDatePicker being rendered in top-left corner)

    Miraculously, but it solved a similar problem for me

    The problem suddenly resurfaced sometime later. In this case make sure that name and id are different! That is:
    Code:
                   {
                        xtype: 'xdatefield',
                        name: 'period_start',
                        //id: 'period_start', THIS CAUSED THE PROBLEM FROM COMMENT #50
                        format: 'd/m/Y',
                        submitFormat: 'Y-m-d'
                    }
    Oh, how I hate IE
    Ateili-na an-telenei | I don't believe in gods | http://dmitriid.com/

  2. #72
    Sencha User
    Join Date
    Apr 2008
    Posts
    36
    Vote Rating
    0
    lacco is on a distinguished road

      0  

    Default


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

  3. #73
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,537
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Thank you for the patch.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #74
    Sencha User realjax's Avatar
    Join Date
    Aug 2009
    Location
    Netherlands
    Posts
    412
    Vote Rating
    6
    realjax is on a distinguished road

      0  

    Default


    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.)

  5. #75
    Ext User
    Join Date
    Jun 2010
    Posts
    23
    Vote Rating
    0
    rogerio.carrasqueira is on a distinguished road

      0  

    Exclamation


    Hi Everybody!

    I put the extension on my code, but the datefield when posts insists on send data as follow:

    Code:
    data{"fields.start_date":"2010-10-13T00:00:00"}
    Pay attention that JSON field has a T between the date and time. How to remove it from there?

    My code:

    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)
    })
    Here where I show may date field, this is on a grid:

    Code:
    {header: "Data InĂ­cio", width: 100, sortable: true, dataIndex: 'start_date', renderer: Ext.util.Format.dateRenderer("d/m/Y"), editor: datePicker},
    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.

    Thanks for your help.

    Cheers,

  6. #76
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,537
    Vote Rating
    380
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    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

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  7. #77
    Sencha User
    Join Date
    Nov 2011
    Posts
    8
    Vote Rating
    0
    SSzretter is on a distinguished road

      0  

    Default


    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',

  8. #78
    Sencha User
    Join Date
    Jun 2012
    Posts
    77
    Vote Rating
    0
    mohaskuar is on a distinguished road

      0  

    Default


    please how can i use the above extension am using extjs,mvc to develope my application and am new to using extensions,,,am using extjs 4... i tried to use the extension ..but not still here is the step i follow.
    1. i have copied the extension source code and saved it by the name datextansion.js and saved it under UX folder.
    2. then i included the file in index.html using <script></script> tag
    3.alsoi have changed the line
    Ext.reg('xdatefield', Ext.ux.form.XDateField);
    with
    Ext.define('Ext.ux.form.XDateField',{
    alias:'xdatefield'

    });

    since am using ext4... i thought its the way to register components and later use them as xtype
    4.finally i tried to add an item to my panel like this
    {xtype:'xdatefield';

    }

    undefined error occurs... what shall I do? Am I Wright on using the Extension...please its argent any help is appreciated.
    Last edited by mohaskuar; 12 Dec 2013 at 12:07 AM. Reason: show progress