Dynamic display of day_date


#1

How can we specify the date value that is displayed as day_date field? Is there a way to pass the date value from a screen and get it displayed in the scheduler header? If the scheduler is taken from a particular screen, the date passed from this screen has to be displayed. Else the default current date. - Some way to load the day_date dynamically in the scheduler based on the screen from where the scheduler is invoked.


#2

Hello @Sruthi_Ramachandran ,

You can return any date or format date in any way from the day_date template function:

scheduler.templates.day_date = function(date){
  if(defaultFormat == randomDate)
    return minForm(new Date(2002, 12, 12)); // example of some custom date you want to return instead of default
  return defaultFormat(date);
};  

So if you able to get the date on:

screen from where the scheduler is invoked.`

You can return it from the template function with no problems:
http://snippet.dhtmlx.com/5/15748eb7a