Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Walter on Jun 29, 2009 03:34
open dhtmlx forum
How do I fit the calendar inside a div wrapper?

Hello
I see that the calendar is width:100% and height:100% in this line:
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>

Can I make it margin:0 auto; I tried width:
<div id="scheduler_here" class="dhx_cal_container" style='width:600; height:500; margin:0 auto;'>

And, other question, Why I can not add html elements before the calendar. I tried width:
<body onload="init();">

<h1>THIS TEXT DOES NOT SHOW</h1>

    <div id="scheduler_here" class="dhx_cal_container" style='width:600px; height:500px; margin:0 auto;'>
        <div class="dhx_cal_navline">
            <div class="dhx_cal_prev_button"> </div>
... rest of the calendar code...

Thanks
Walter
Answer posted by Support on Jun 29, 2009 08:52
>>Why I can not add html elements
You can , but you need to change positioning of calendar to relative 

<h1>THIS TEXT DOES NOT SHOW</h1>
<div id="scheduler_here" class="dhx_cal_container" style='width:600px; height:500px; position:relative;'> 


>>Can I make it margin:0 auto; I tried width:
Yes, but the same as in the above case, you need to add position:relative;
Answer posted by Walter on Jul 01, 2009 00:23
Hello,  thanks it works right.
A few more questions:
1- I'm going to use the calendar in a single website which is a college site. I guess the appropiate license is Single component/Commercial. Price : $49. Is this correct?
2- How do I make the calendar 'read only'? Or Does it have any login/logout component?
3- In the weekly view it shows 2 row for each hour. How can I make it show 4 or 6 rows instead of 2?

Walter
Answer posted by Alex (support) on Jul 01, 2009 01:58
Hello,

>> I'm going to use the calendar in a single website which is a college site. I guess the appropiate license is Single component/Commercial. Price : $49. Is this correct?

Regarding license, please contact us at sales@dhtmlx.com 

>> How do I make the calendar 'read only'? 

The solution for read-only was aleady discussed. Please, take a look:

http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=9728

>> Or Does it have any login/logout component?

Unfortunately, scheduler doesn't provide ready solution to do that 

>> In the weekly view it shows 2 row for each hour. How can I make it show 4 or 6 rows instead of 2?

You can increase the hour height and correspondingly a number of rows  as follows:

scheduler.config.hour_size_px = 84; /*4 rows will be shown*/

Answer posted by Support on Jul 02, 2009 05:09
>>How do I make the calendar 'read only'? Or Does it have any login/logout component?
In latest version - you can use 
         scheduler.config.readonly = true;
this will block client side part of functionality. 
Also, you can add some kind of session based check inside connector code - to prevent not authorized access. 

>>How can I make it show 4 or 6 rows instead of 2?
Alternatively to above solution - you can just resize the bg image, used to produce hour lines - imgs/databg.png