Change event for a date time field does not work when used in a multi field | Community
Skip to main content
ravitejas
New Participant
October 16, 2015
Solved

Change event for a date time field does not work when used in a multi field

  • October 16, 2015
  • 3 replies
  • 1529 views

Hi All,

I have a multi field which contains a number of fields out of which one is a datetime field which is declared as below

this.dateField = new CQ.Ext.form.DateField({
                width: 300,
                allowBlank: false,
                hideTime:true,
                listeners: {
                    change: {
                        scope:this,
                        fn:this.updateHidden
                    },
                    dialogclose: {
                    scope: this,
                    fn: this.updateHidden
                }
                }
            });

The field renders correctly, however when I try to change the date, the date change does not happen and it retrieves the old date value. This is only happening when I am using the date field. Am I missing something here?

 

Thanks,

Ravi

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

What version of CQ are you using -- are you coding your date time field in a custom xtype?

If you create a custom xtype that defines a CQ.Ext.form.DateField -- when you make a change - its handler will be fired. For those reading this thread and wondering how to create an AEM custom xtype -- see:

http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html

3 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

What version of CQ are you using -- are you coding your date time field in a custom xtype?

If you create a custom xtype that defines a CQ.Ext.form.DateField -- when you make a change - its handler will be fired. For those reading this thread and wondering how to create an AEM custom xtype -- see:

http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html

ravitejas
ravitejasAuthor
New Participant
October 16, 2015

Hey, 

I am using CQ 5.6 and have tried with the DateField xtype as well but it still does not work. I have used the same procedure that was given in the link to create my custom xtype. However, only difference is that I have tried to place the custom xtype in a multi field.

Also, here are few things that look strange

there is an xtype named datetime, but I do not find the corresponding code for it in CQ. All I can find is the datefield.js which is for the xtype "datefield" .

Thanks,

Ravi

smacdonald2008
New Participant
October 16, 2015

I will look into getting a functioning code example for you. I will post an update.