Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    15
    Vote Rating
    0
    Alvaro L is on a distinguished road

      0  

    Default DatePicker Field with clearIcon not clearing the date

    DatePicker Field with clearIcon not clearing the date


    REQUIRED INFORMATION




    Ext version tested:
    • Sencha Touch 2.1.0
    Browser versions tested against:
    • Chrome
    Description:
    • Date picker with clearIcon set to true is not clearing the box
    Steps to reproduce the problem:
    • Create a form with a date field (Ext.field.DatePicker) with clearIcon set to true, both the clear icon and the select selector arrow appears, when clicking (tapping) on the clear icon the picker appears
    The result that was expected:
    • Expected to have the date deleted
    The result that occurs instead:
    • Date picker appears
    Test Case:
    This is our DatePicker implementation:
    Code:
        Ext.define('Application.field.Date',
    {
        extend: 'Ext.field.DatePicker',
        xtype: 'appdate',
        
        config:
        {
            dateFormat : 'd M Y',
            picker:
            {
                yearFrom : new Date().getYear() + 1900 - 50,
                yearTo : new Date().getYear() + 1900 + 20
            },
            clearIcon : true
        },
        
        initialize: function()
        {
            this.createPicker();
            this.callParent();
        },
        
        createPicker : function()
        {
            var picker = this._picker,
                value = this.getValue();
            
            if (picker && !picker.isPicker)
            {
                picker = Ext.factory(picker, Ext.picker.Date);
                if (value != null) 
                {
                    picker.setValue(value);
                }
            }
            
            picker.on(
            {
                scope: this,
                change: 'onPickerChange',
                hide  : 'onPickerHide',
                show : function()
                {
                    this._picker.applyCancelButton(Application.getText('cancel'));
                    this._picker.applyDoneButton(Application.getText('done'));
                }
            });
            this._picker = picker;
            return picker;
        }
    });





    HELPFUL INFORMATION

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,797
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is not a bug but intended behavior. The reason is we capture the tap on where the field is to open the picker which the clearIcon is under.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    15
    Vote Rating
    0
    Alvaro L is on a distinguished road

      0  

    Default


    Hi Mitchell

    I understand the desired behavior but I also would say that showing a clear button that does not clear the field is, if not a bug, an undesired behavior. Also the clear icon appears on top of the selector's triangle which makes it ugly.

    Is there a workaround for this? We would like our customers to be able to clear the date, probably more people will want this also.

    Thanks and regards

  4. #4
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    15
    Vote Rating
    0
    Alvaro L is on a distinguished road

      0  

    Default


    Sorry, it is not clear if this is being looked at or if the previous reply was an official statement, in case it was I will create another topic in the Q&A forum in order to resolve this problem.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi