Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Luis Domingues on Jan 27, 2009 09:33
open dhtmlx forum
Calendar and onChangeEvent not working

I can't get the onChange event to work with calendar....


<script>
    var dateFrom = null;
    var dateTo = null;
    
    window.onload = function () {
        cal1 = new dhtmlxCalendarObject('calInput1');
    
    }
</script>

<input type="text" id="calInput1" onChange="alert(1)" style="width: 200px; font-size:12px;" >



can anyone help me? Also tried the attachEvent, but looks like it only works for events declared in the object (like the onClick event).

Answer posted on Jan 28, 2009 02:57
The calendar doesn't remove the native onChange event from the input, but it will not be triggered when calendar changes the value of the cell. 
The only correct way to handle changes in calendar - use onClick event of dhtmlxCalendar