Few questions


First want to thank you for this great extension. It’s simple and very intuitive to use :slight_smile:
I have few questions tho:

  • Is it possible to get the date streamed from the server side. Now the date is pulled localy from users computer - if i change my pc date it will also change current date calendar’s date on website.

  • I want to insert holidays in the calendar - is there a way i can limit start the end year? Example: from 2012 - 2030.


p.s. i’m using Joomla 2.5 and latest Scheduler.

Anyone here?

thanks for your feedback.

  1. Try to use server_utc option:
    docs.dhtmlx.com/doku.php?id=dhtm … fig#others
    to turn it on you have to open file scheduler_include.html and and this follow code:
scheduler.config.server_utc = true;
  1. Unfortunately there no special option to configure it. But you may customize scheduler:
    replace in dhtmlxscheduler.js code
A=A.getFullYear()-5;for(var D=0;D<10;D++){F+="<option value='"+(A+D)+"'>"+(A+D)+"</option>"}


A=2012;for(var D=A;D<=2032;D++){F+="<option value='"+(D)+"'>"+(D)+"</option>"}

Thanks for reply, but non of these helped.

  1. Tried with include, no luck.
  2. Searched everywhere, but i can’t seem to find that piece of code.
    All i found in dhtmlxscheduler.js similar was:

dt = dt.getFullYear()-5; for (var i=0; i < 10; i++)html+="<option value='"+(dt+i)+"'>"+(dt+i)+"</option>"; that was at least kinda similar to the one you pasted :slight_smile:


  1. Coult you describe more in details how it doesn’t work?
  2. Yes, it exactly the same.


  1. I pasted the code in scheduler_include.html, copied on the server and it still pull’s the local time (from user). Also i tried with enabling scheduler.config.server_utc = true; in scheduler config file and doesnt work.

  2. I searched for the code you pasted in dhtmlxscheduler.js, but it’s not there.
    The code i searched:

A=A.getFullYear()-5;for(var D=0;D<10;D++){F+="<option value='"+(A+D)+"'>"+(A+D)+"</option>"}
  1. Turn option on, after that try to create new event. This event should store server-time in database, not client’s timezone.
  2. Yes, replace code which you found.

Thanks for help, but it’s just not working = i’m cursed :laughing:

  1. I guess i didn’t clarify the exact issue. I wanted for calendar to take current date from the server because when i change the clock on my pc to 12. march, then refresh the calendar on the site and hit “Today” button, it will go to 12. march. It would be great if the calendar stays on actual current date that is 30. april and not change it according to local date settings of user.

  2. I changed the code:

dt = dt.getFullYear()-5; for (var i=0; i < 10; i++)html+="<option value='"+(dt+i)+"'>"+(dt+i)+"</option>";


A=2012;for(var D=A;D<=2032;D++){F+="<option value='"+(D)+"'>"+(D)+"</option>"}

but it doesnt work. I need to block users on monthly/year view not to go/browse before 2012 and beyond 2030.

Hope you’ll find a solution, i’m kinda noobish with jscript :slight_smile: Thanks


  1. unfortunatetly there is no way to implement it.
  2. please, make sure that file dhtmlxscheduler_year.js loaded not from browser cache. If still doesn’t work could you provide link to your scheduler?

Thanks radyno for help :slight_smile:
The solution for no.2 (limit start/end year view) was to open scheduler_include.html and include:

<script> scheduler.attachEvent("onBeforeViewChange", function (old_mode, old_date, mode , date){ var mind = new Date("January 1, 2012 00:00:00"); if (date.valueOf() < mind.valueOf()) return false; var maxd = new Date("December 31, 2030 00:00:00"); if (date.valueOf() > maxd.valueOf()) return false; return true; }); </script>

If i find some way for no.1 (server time), i’ll post it here.

Hi there, I’m also trying to do something similar. I am creating a 2015 calendar in Year view. I want my calendar to start from 1st January 2015 instead of today’s date which is default. I tried using your code, but it didn’t work. Do you have any ideas how I can make this work?

Thank you!