Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Datetime field listener

Smiley_101
Level 2
Level 2

Hi all,

I am trying to implement a listener on a dialog field with xtype datetime for the change event.

The usecase is: To set the end date (value same as start date) once a start date has been selected by the user in the dialog. Start date and End dates are siblings.

I have implemented the following function on the listener node created under enddate field in dialog-

function()
{
var minDate = new Date();
var endDate =  this.previousSibling();
minDate=endDate;
minDate.setDate(minDate.getDate());
this.df.minValue=minDate;
}

The function doesnt work as expected.

Am i missing something here? Please help....

1 Accepted Solution
Sham_HC
Correct answer by
Level 10
Level 10

Have you implemented at beforerender listener or other listener?
   Have a debug statement and see where it is failing.

View solution in original post

1 Reply
Sham_HC
Correct answer by
Level 10
Level 10

Have you implemented at beforerender listener or other listener?
   Have a debug statement and see where it is failing.

View solution in original post