Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Benjamin on Oct 06, 2009 04:10
open dhtmlx forum
dhtmlxScheduler - Little Grid Question

Hello there,

just a little question: How to change the steps at the left, where normaly the hours take place like 7 o'clock, 8 o'clock and so on?
I want these one hour steps to be smaller, like 15 Minute steps... I tried some things on my own, but nothing really brings the effect i want to :-/

Any clue for me?

Thanks alot,
Benjamin from Germany
Answer posted by dhxSupport on Oct 06, 2009 06:13
You can use scheduler.config.hour_size_px=10. 
Please find more information here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:settings
Answer posted by Benjamin on Oct 06, 2009 06:37
Thanks for your really quick reply.

But i don't mean, that i want to greater the space between 7 o clock and 8 o clock!
i used this instead :-)

What i want to get is the following:
07:00
07:15
07:30
07:45
08:00 and so on... Could you get my thing?


To write down the Time and draw these horizontal dottet line (or is it also possible to extend these lines through the whole schedule grid from left to right?


Greetings,
Benjamin
Answer posted by dhxSupport on Oct 06, 2009 10:05
You can use scheduler.config.time_step={numeric}
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:settings#scales
Answer posted by Stanislav (support) on Oct 06, 2009 10:18
You can increase a height of one hour ( double it ) , so you will have 4 color lines per hour - each for 15 minutes interval. 
After that you can redefing hour_scale template , which generates labels for the hours, and instead of plain number , output 4 divs , each with time shifted on 15 minutes - in result it will look as different time for each colored line. 

Answer posted on Oct 08, 2009 08:35
Hey again,

i tried it on my own and i made the background image bigger, so now i got what i want.
But i have not make it working to edit the hour_scale Template :-(

Any preference where i can get more informations?
Anyone did it yet? I am sure someone did ;)

Could be interesting think to split one hour into 4 parts with little horizontal-lines :)
Answer posted by Stanislav (support) on Oct 08, 2009 10:53
Please check the attached sample.
Attachments (1)
Answer posted by Benjamin on Oct 08, 2009 14:31
This is godlike...
I hope you didn't made it specialy for me?

Now i have a clue how to code own functions... *very happy*

It's cool, what you guys give such a fine support, more than support i mean :)
Many real deep thanks!
Answer posted by Benjamin on Oct 08, 2009 16:02
Hey There again,

i worked some bug out of your example... i made the script on my own, and when i was finished i realised the following bug:
When i click on an event and go to details view you can see the error in the PERIOD section...

Can u recreate bug?
The select values of time period are for example like this:
<option value="0">00:0000:1500:3000:45</option>
Answer posted by Benjamin on Oct 08, 2009 16:35
Oh damn, and before i go to bed another issue i want to fix (if it is possible to seperate the following things):

When i change your script to give the FULL HOUR a bigger font-size, than i made these:
            for (var i=0; i < 4; i++) {
                if(i == 0) html.push("<div class='sub_scale_h'>"+format(date)+"</div>");
                else html.push("<div class='sub_scale'>"+format(date)+"</div>");
                date=scheduler.date.add(date,15,"minute");
            }
Now my issue gets viewable, cause i changed the font-size for "sub_scale_h" to 10pt.
Have a try and you will see, that in month-view (and only there) the single events are to big for their line-height!
I want them to be 8pt as usual, but it seems these guys got the same css class like my hour Scales ?

I am feeling sad that i have so damn css styling problems and getting your ones on the nerves :-(

But bette ask someone whio really knows about it than just buing a ready scheduler where i will learn nothing about it when configuarte it...

Thanks for reading my Texts support... really thanks!!!
Answer posted by Benjamin on Oct 08, 2009 16:46
Shame on me...

I deletetd

        scheduler.templates.event_bar_date=function(start,end,ev){
            return format(start)+" ";
        }

Cause i couldn't get where it is for... Okay, i got, that it changed my last post into nonsense...
But there's still the thing with the TIME PERIOD...

O dear, i would be that happy if i could understand how that stuff really works... my basic knowledge can't tell me how could this little function fix my problem :-/
Answer posted by Stanislav (support) on Oct 09, 2009 01:46
>>i worked some bug out of your example... i made the script on my own, and when i was finished i realised the following bug:
>>When i click on an event and go to details view you can see the error in the PERIOD section...

Problem confirmed , the same template shared for time-picker creation which causes the problem. 
Updated version of scheduler is attached to email, it uses different templates for time picker and scale. ( the same fix will be added to the next version of the scheduler )
Attachments (1)
Answer posted by Stanislav (support) on Oct 09, 2009 01:49
>>I deletetd
>>Cause i couldn't get where it is for... 
The templates for event's date normally reuse logic of hour scale. In your case the hour scale has a custom templates, so the event date templates need to be redefined as well.
Basically it is result of bad design, we will update it in future, so each template will be independent, and changing one will not affect others. 
Answer posted by Ben on Oct 09, 2009 01:55
I get it, thanks for explanation.
Will have a try on your fix right now...
Again, thank you guy(s)!!! You make my day again... worte ya an email.