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 - Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    26,130
    Vote Rating
    82
    jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold

      0  

    Default


    Thank you for the patch.

  4. #74
    Sencha User realjax's Avatar
    Join Date
    Aug 2009
    Location
    Netherlands
    Posts
    412
    Vote Rating
    4
    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 - Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    26,130
    Vote Rating
    82
    jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold jsakalos is a splendid one to behold

      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.

  7. #77
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    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',