1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    29
    Vote Rating
    0
    cassiopeia is on a distinguished road

      0  

    Default Answered: How to place a listener to a read-only textfield

    Answered: How to place a listener to a read-only textfield


    Hi,

    i would like to show a new view when you focus on a textfield. this has to be read-only so the keyboard wont show up.

    Start date ---textfield---
    End date ---textfield---

    the new view contains also 2 textfields and a datepicker.

    i want one view to choose start and end date. when you press a finish button, the new view closes and the values are inserted in the original textfields.

    the question is, how can you detect focus on a read-only textfield?


  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    698
    Answers
    41
    Vote Rating
    40
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    29
    Vote Rating
    0
    cassiopeia is on a distinguished road

      0  

    Default


    thank you!
    it works =)

    except that you can't call a method or fire an event from within the listener?

    Code:
    initialize : function() {
    date = {
                flex : 1,
                xtype : 'fieldset',
                items : [
                {
                            xtype : 'textfield',
                            name : 'StartDate',
                            id : 'StartDate',
                            readOnly : true,
                            label : 'From',
                            listeners : {
                                element : 'element',
                                tap : function() {
                                    this.fireEvent('pickdate', this);
                                }
                            }
    
                        },
          {...}]
    };
    
    this.add([date]);

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar