Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by techtigre on Mar 26, 2009 09:41
open dhtmlx forum
dhtmlx calendar inside dhx window popup

I have need to place the dhx calendar inside of a small dhx window popup; i am able to do this , however the calendar doesn't fit properly in the popup. What is a way i can get this widget to show up "centered" inside a small dhx window "popup"?
Answer posted by Alex (support) on Mar 27, 2009 02:43

You can use attachObject method to add calendar container and then initilize the calendar. For example:

<div id="dhtmlxCalendar"></div>

<script>

var dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.setViewport(350, 50, 400, 400);
dhxWins.vp.style.border = "#909090 1px solid";
dhxWins.setImagePath("../../codebase/imgs/");
 
var w1 = dhxWins.createWindow("w1", 100, 10,180, 195);
w1.setText("Calendar");
w1.attachObject('dhtmlxCalendar')

cal = new dhtmlxCalendarObject('dhtmlxCalendar');
cal.setSkin("dhx_blue")
cal.draw();

Answer posted on Mar 27, 2009 09:25
That solutions does work, however my calendar is not centered and the window header covers up the 'month' portion of the calendar?  What could be the problem?
Answer posted by Alex (support) on Mar 30, 2009 06:24
Please, take a look at the attached sample. Possibly it'll help.
Attachments (1)
Answer posted on Mar 30, 2009 12:57
Thanks for all your assistance.  I had an errant style="" applied to the calendar <div>  tag.  Your code allowed me to see that and correct it.  Thanks for the excellent response time!