I have a form with a Readonly text field for a date.
When the user clicks on the field, or a calendar icon next to the field, a modal calendar pops-up.
Once the user clicks on a date in the calendar window, the date is inserted into the date text field.
When a date is inserted into the field, I want to call a function to populate an array of dates. However, my OnChange event is not firing.
I have tried placing the code in the OnBlur event, but it executes too often (once when the calendar pops up, next when the user chooses a date and gets back to the field, ...).
And, if I place it with the OnClick event, it causes the event to fire before the date has been entered.
How can I get the OnChange event to execute? Or, if there's a better way, please let me know ;o)
Here's an abbreviated version of the code. Let me know if you need more details...
Thanks in advance!
//date currently in targetfield
var dtValue = frmRequest.all(TargetField).value;
//use server current date rather than client
var today = frmRequest.hidToday.value;
//Build an array of dates...
//and set another field on the form to the last date of the array.
title="Click to show calendar">