Event width in month grid view

Can you please tell me where the width of an event entry in month grid view is set. I have managed to expand the “all day” entry to be multi-lined with word-wrap but I would like to make it the full width of the cell to maximise the space available.

Please see the attached image. Thank you!


Could yo please post your code used to make the multi line event word wrap.
Thx

In dhtmlxscheduler.css find this section:


.dhx_cal_event_line{
background-color:#FFE763;
border:1px solid #B7A543;
border-radius:3px;
font-family:Tahoma;
font-size:8pt;
height:78px;
padding-left:3px;
color:#887A2E;
cursor:pointer;
/overflow:hidden;/


You need to change the height from the original setting (I think it was something around 13px) to the height of the box you want. You also need to comment out the overflow setting as shown.

I’ve been searching through all the other files but can’t work out how and where the width is set though.

where the width of an event entry in month grid view is set
width of event bar is dynamic and set in js code

You can try to add something like next

var original = scheduler._render_v_bar; scheduler._render_v_bar = function(id, x, y, w, h, style, a, b, bottom){ w+=6; return original.call(this,id, x, y, w, h, style, a, b, bottom); };

Hi Stanislav - that didn’t work but I eventually found an easier solution. Don’t know why I didn’t see it before. This is the relevant line in the dhtmlxscheduler.js file:

var html=’<div event_id="’+ev.id+’" class="’+cs+’" style=“position:absolute; top:’+y+‘px; left:’+x+‘px; width:’+(x2-x-6)+‘px;’+color+’’+bg_color+’’+(ev._text_style||”")+’">’;

Width was originally (x2-x-15) and I just changed it (x2-x-6).

Looks great now. Thanks.

This is how it looks - the client is renting a cabin and only ever wanted to do a full-day entry. It works really well now.

Thanks for the code. How do you handle the height to handle resizing of the calendar?

The height of the calendar is fixed so there is no need for resizing. I’m also using a fixed width Joomla template, so the width of the calendar (and therefore the size of the boxes for each day) never changes.