Results 1 to 3 of 3

Thread: Click event for DatePicker is only working for calender icon but not for textbox

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    221
    Answers
    10
    Vote Rating
    3
      0  

    Default Answered: Click event for DatePicker is only working for calender icon but not for textbox

    Hi All,

    I used following code to add a datefield. Datefield comes with a text box and a calender icon by default.
    Below Code is adding 'click' event on top of calender icon (shown in the red cricle) but not over the text box (shown in yellow background).

    Picker.PNG

    Code:
    Ext.define('MyDate', {
        extend: 'Ext.form.field.Date',
        
        onTriggerClick: function(){
            Ext.create('Ext.window.Window', {
                title: 'I am a window',
                width: 200,
                height: 200,
                autoShow: true
            });
        }
    });
    Ext.onReady(function(){
        new MyDate({
            renderTo: document.body
        });
    });

  2. Try to set editable config of your datefield to false.

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      1  

    Default

    Try to override 'expand' method (inherited from Picker).
    Also, by default, field is editable, that's why clicking on input will only bring focus to it.

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347
    Vote Rating
    114
      0  

    Default

    Try to set editable config of your datefield to false.

Posting Permissions

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