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”?
You can use attachObject method to add calendar container and then initilize the calendar. For example:
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();
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?
Please, take a look at the attached sample. Possibly it’ll help.
window_with_calendar.zip (111 KB)
Thanks for all your assistance. I had an errant style="" applied to the calendar
tag. Your code allowed me to see that and correct it. Thanks for the excellent response time!