Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vinod on Oct 01, 2008 09:02
open dhtmlx forum
Creating calendar linked to input

Creating calendar linked to input
-----------------------------------------

1. <script>
cal1 = new dhtmlxCalendarObject('calInput1');
</script>
<input type="text" id="calInput1" class="css1" readonly="true">

If i try to use the above code (this is as shown in examples of the calendar control) it does not work.

2. If i create the dhtmlXCalendar object on body onload, only then it works.
<body onLoad="doOnLoad();">

<script>
function doOnLoad ()
{
cal1 = new dhtmlxCalendarObject('calInput1');
}
</script>


Can you please suggest why the isnt the first code does not work.

Regards
Vinod W
Answer posted by Support on Oct 01, 2008 09:50
The input object must exist on moment of dhtmlxCalendarObject call, so the correct code will be 

<input type="text" id="calInput1" class="css1" readonly="true">
<script> 
cal1 = new dhtmlxCalendarObject('calInput1'); 
</script> 


we will update sample, sorry for inconvenience


Answer posted by Vinod on Oct 02, 2008 22:31

Thanks for the reply. I am sorry, even when i was using the code as you mentioned, even then it does not work. I get an IE:Operation aborted error. Can you please suggest.

Thanks

vinod

Answer posted by Support on Oct 03, 2008 01:57
Problem caused by bug in IE rendering engine, but latest version of dhtmlxCalendar already must have workaround for it. 
Please try to use latest version. 
http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=5193&ssr=yes&s=calendar