Onchange is not working for date controls


I have 2 date inputs Start Date and End Date.

Onchange of start date , I'm assigning that date to end date.

It's getting assigned to variable but it is not reflecting in UI.

Please note I'm doing ajax refresh for date container.

Please advice how to show start date in end date on change of start date.

Thanks and Regards,

Suraj Borade

To what variable are you assigning the start date?
It looks like you are using a form, if you are assigning the data to the input variable (which you placed inside the form) and used the form variables into the inputs themselves.

Then refreshing the inputs only will result in refreshing the form variable.
You could try to assign the value directly to the form variable, or to refresh the entire form instead.

Hi Suraj,

I created a sample for you I am entering start date and on change of start date populating end date.It is working for me.

Please find attached oml.



Thanks for the replies guys.

Joey@ : I'm not using form. There 2 containers I have used, and values are going from one to second.

@Shashi: With this approach, once start date is replicated into end date, I can't select end date from another text box if I want to select another date.

Does anyone have another approach.


Suraj Borade wrote:

Does anyone have another approach.

You are using the calendar widget from WebPatterns right?

You could try setting the InitialDate input with the startDate variable instead, that might yield some different results. (though you will have to make sure you ajax refresh the widget in the onchange action of the startdate input)


Hi Suraj,

Please do the below change in Start Date on change:

 1. Asian start date into End Date variable.

2. Refresh End date Text box.

3. Refresh End date Calendar which is associated with End Date text Box

Please find updated oml.

I checked It is working. 



Did you try Refresh Data? I believe that you are saving that data in some DB table, I guess...If you do refresh data and AjaxRefresh that doesn't work?

Best regards,


Sorry for the late reply guys.Joey's solution worked for me.

Thanks a lot.