Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Danny on Mar 30, 2009 10:02
open dhtmlx forum
Review your calendar control

I have an aspx page that dynamically builds a table with a edit control in it and then puts that table into the div.

Here's a simple version

strTable="<table><tr><td><input type='text' id='calInput1' readonly ></td></tr></table>
DIV.innerHTML=strTable


after i build the table and set the div i

window.dhx_globalImgPath="../dhtmlx/dhtmlxCalendar/dhtmlxCalendar/codebase/imgs/";

    var cal1, cal2, mCal, mDCal, newStyleSheet;
    var dateFrom = null;
    var dateTo = null;
    cal1 = new dhtmlxCalendarObject('calInput1');



When I click on the edit, nothing happens...

However if i create the control in the form in html

For example

<form>
<input type='text' id='calInput1' readonly>
</form>


It works fine.

Can someone please help? Thanks..

Answer posted by Alex (support) on Mar 31, 2009 02:40

Please, be sure that 'calInput1' exists when you initialize calendar:

 cal1 = new dhtmlxCalendarObject('calInput1'); 

If the problem isn't resolved, please, provide the complete sample to reproduce it.