Results 1 to 3 of 3

Thread: Virtual Keyboard hides datepicker in Android 4.x devices

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    18
    Vote Rating
    1
      1  

    Default Virtual Keyboard hides datepicker in Android 4.x devices

    I have the following code

    Code:
      xtype: 'fieldset',
      title: 'Enter Card Details',
      defaults: {
        required: true
      }, 
      items: [
        {
          xtype : 'textfield',
          label: 'Name',
          placeHolder: 'Name On Card',
          labelWidth: '30%', 
        },
        {
          xtype : 'numberfield',
          label: 'Card No',
          labelWidth: '30%', 
          id: 'numberfield_cardnumber_id'
        },
        {
          xtype : 'datepickerfield',
          id: 'datepickerfield_cardexpiry_id',
          label: 'Exp Date',
          dateFormat: 'm/y',
          labelWidth: '30%',
          required: true,
          picker: {
            yearFrom : new Date().getFullYear(),
            yearTo : new Date().getFullYear() + 10,
            slotOrder:["year", "month"], 
            listeners: {
              show: function(component, eOpts) {
                console.log("show");
                this.setValue(new Date());
    
                try {
                  var elemPD = Ext.getCmp("numberfield_cardnumber_id");
                  elemPD.element.dom.blur();
                }
                catch(e) {
                  console.log("Error :'"+e.message+"'");
                }
              }, 
            } //picker listener
          } //picker
        } //datepickerfield
      ], //items
    
    }


    When i move from numberfield (by tapping on datepicker) with virtual keyboard still present on the screen. The datepicker box is shown, but behind the virtual keyboard. Any tips or tricks will be greatly appreciated. Thanks in advance.

    note: This only happens in Android version 4.x. I never saw it in my older phone which runs Android 2.3.5.

  2. #2
    Sencha Premium User
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    723
    Answers
    42
    Vote Rating
    46
      0  

    Default

    which version of ST are you using?

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    18
    Vote Rating
    1
      0  

    Default

    I'm using Sencha Touch 2.0 (Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •