How can a use the Calendar and Scheduler

Hello,



how can a use the Calendar and Scheduler on the same site?

when i load the Calendar the Scheduler will not work.



Thanks


Hello,


there shouldn’t be any problems with using both components. Please, check that libraries for scheduler and calendar are correctly included.


If the issue still occurs, please provide the initialization code for both components.

Hello,



i think all libraries correctly included, here is the code:





test

   
   
   


 
 
 
     




   

    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   






   



   

       

           

               

        <?php include("dbcalendar.php"); ?>

        <?php include("fastinput.php"); ?>
               

           

           

               

                   
                   
               

           

       

       

           

      <?php include("firm.php"); ?>

      <?php include("fastinfo.php"); ?>
           

       

       
 

   

     



Hello,


the issue is caused by using two onload event handlers.


Try to place the calendar intialization code to the init() function and delete window.onload = function () {…} handler.

Hello,

is the following code correct?


Yes, it is. But it seems that you’ve missed the scheduler initialization here

Here is the Scheduler initialization:





So, the full code should like as follows:


function init() {


var mDCal;
mDCal = new dhtmlxDblCalendarObject(‘dhtmlxDblCalendar’, false, {isMonthEditable: true, isYearEditable: true});
mDCal.setYearsRange(1980, 2020);
mDCal.setDateFormat("%d/%m/%Y");
mDCal.setDate(“06/01/2008”,“15/01/2008”)
mDCal.draw();

scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.lightbox.sections=[
{name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},
{name:“location”, height:43, type:“textarea”, map_to:“details” },
{name:“time”, height:72, type:“time”, map_to:“auto”}
]
scheduler.config.first_hour=8;
scheduler.config.last_hour=18;
scheduler.locale.labels.section_location=“Location”;
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;



scheduler.init(‘scheduler_here’,null,“day”);
scheduler.load(“events.php?uid=”+scheduler.uid());

var dp = new dataProcessor(“events.php”);
dp.init(scheduler);
}



Thanks, it works :wink:

My last question is it possible to show the schedular only from monday till friday?

Regards


It is possible. The code example is attached


sample_workweek.zip (1.02 KB)

Thanks the example works.can i start with woorkweek:

scheduler.init(‘scheduler_here’,null,“weekweek”);

will not work.

Regards

Please check Grid fails to init with custom view activated at
dhtmlx.com/docs/products/dhtmlxS … h_problems

Thanks it works :wink: very nice support.

I hope this is my last problem, i have an error in firebug an internet explorer:

(Firebug)

this.con is null
this.daysPan.className = “dxcaldays”;th…ck = function () {if (self.isVisible())\n (Line 50)

(Internet Explorer)
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727)
Timestamp: Mon, 27 Jul 2009 17:03:21 UTC

ERROR: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Zeichen: 0
Code: 0

There is no such string as this.daysPan inside sources of dhtmlxScheduler, so problem must be caused by some other component, used on the page.

>>Unable to modify the parent container element before the child element is closed
If problem still related to scheduler - try to move initialization code to the onLoad handler of the page - it must resolve the issue.