calender onclick problems

  • ok I have switched to the easy way to do the calender but I of course have one problem.

    the calender works but I have it displaying with an onclick. so when I click in the text field the calender icon appears and works great. but say i decide to click on the textfield again I get another calender icon that appears on the left of the text field. how can I get this to work properly. trying to finish up a project any help is appreciated. I am going nuts trying to get this to work...


    function initCalendars() {
    var textFields = Ext.query('.ExtDateField');
    var dateFields = ;
    Ext.each(textFields, function(textField) {
    var dateField = new Ext.form.DateField({
    allowBlank:false,
    format:'m-d-Y',
    applyTo: textField
    });
    dateFields.push(dateField)
    });
    }



  • do I need to change the css, or can I put an inline style?


  • Of course it's going to happen again. You keep creating calendars every time it gets clicked!


    Ext.select('.ExtDataField').on('click', function(e)
    {
    //bind your stuff here
    }, null, {single: true});


    This means the event only gets fired once, not multiple times.


  • cool thanks...

    I keep getting errors in eclips when trying to implament your code into mine. do you mind giving a little example of how this code goes into my js code. I am having problems with the null(single line.


  • never mind,. thanks for your help. I got it I just had the cal load when the page loads not onclick.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about calender onclick problems , Please add it free.
    Posted on January 7th 2009 in bomisasia.com edit