HOWTO: How to customize default calendar settings

sugarcrmdevelopers —  April 13, 2012 — 13 Comments

UPDATED 1/2/2013 – Added note about display_timeslots setting, thanks to the user comment.

Editor’s Note: This article comes from Cedric Mourizard, one of the leading members of the Sugar Community and consultant for SugarCRM Gold Partner Synolia. Here he covers some of the new config setting available now with the new calendar in Sugar 6.4.

One of major new feature in SugarCRM 6.4 is Calendar enhancements; You could configure default settings about this calendar by overriding some parameters in your config_override.php file

Changing default view in calendar module:
Available values: day, week, month and share

$sugar_config['calendar']['default_view'] = 'week';

Display/Hide calls and tasks:
Available values: true and false

$sugar_config['calendar']['show_calls_by_default'] = true;
$sugar_config['calendar']['show_tasks_by_default'] = true;

Default quick edit popup size in pixel:

$sugar_config['calendar']['editview_width'] = 990;
$sugar_config['calendar']['editview_height'] = 480;

Default step size by view
Available values: 15, 30 and 60

$sugar_config['calendar']['day_timestep'] = 15;
$sugar_config['calendar']['week_timestep'] = 30;
$sugar_config['calendar']['month_timestep'] = 60;

Enable/Disable drag-and-drop feature to move calendar item
Available values: true and false

$sugar_config['calendar']['items_draggable'] = true;

Enable/Disable additional detail icon on calendar item
Available values: true and false

$sugar_config['calendar']['mouseover_expand'] = true;

Enable/Disable showing hours on the calendar widget
Available values: true and false

$sugar_config['calendar']['display_timeslots'] = false;

To summarize, all settings:

$sugar_config['calendar']['default_view'] = 'week';
$sugar_config['calendar']['show_calls_by_default'] = true;
$sugar_config['calendar']['show_tasks_by_default'] = true;
$sugar_config['calendar']['editview_width'] = 990;
$sugar_config['calendar']['editview_height'] = 480;
$sugar_config['calendar']['day_timestep'] = 15;
$sugar_config['calendar']['week_timestep'] = 30;
$sugar_config['calendar']['month_timestep'] = 60;
$sugar_config['calendar']['items_draggable'] = true;
$sugar_config['calendar']['mouseover_expand'] = true;

13 responses to HOWTO: How to customize default calendar settings

  1. 
    erika keturakiene April 26, 2012 at 7:55 am

    Is it possible to have call info expanded without hovering mouse over it?

  2. 

    Im keen to achieve two things, first have an “hour view” where i can display in minutes & have the option of including seconds in the display. 

  3. 

    Thanks for the great feedback on the Calendar! We are eager to continually improve this, so please give us any feedback on new enhancements to it to http://bugs.sugarcrm.com. And as always, if you have a code fix you’ve made to it for your organization, you can always contribute it back to us at https://github.com/sugarcrm/sugarcrm_dev.

  4. 

    hello John, im actually in need of guidance on customizing sugar calendar, first i need to have an “hour view” listing on the hour, split by minutes and seconds, for a certain application. I also need to input my meetings and activities, and one other module using time format yyyymmddhhmmss format, I need to put in events that last 30 seconds. I have been going in blind, the irc channel is not as active and i posted a question in the forums that went unanswered for ages. Kindly point me somewhere. 

    • 

       We don’t have documentation per say for this sort of customization, but my guess is that it’s somewhere in CalendarDisplay.php or CalendarGrid.php where you’ll need to start hacking away. Mind you, these changes won’t be upgrade safe at all.

  5. 

    Thanks John! (Loved your book, BTW – best dev guide to SugarCRM available 🙂

    My boss has been making me CrAzY insiting that users’ default home pages
    NOT show hours on the calendar widget. But he did NOT want me hacking
    core (I taught him that :-).

    The available options you posted didn’t include anything about hours, but a little digging in “CalendarGrid.php” turned up “display_timeslots.”

    So I just dropped the following line into “config_override.php”. And it SEEMS to have worked.
    🙂

    $sugar_config[‘calendar’][‘display_timeslots’] = false;

    Thanks again for all your help!

  6. 

    Another possible override option is the value

    $sugar_config[‘calendar’][‘show_completed_by_default’] = true;

  7. 

    Did you consider implementing “all day event” – like in google calendar?

  8. 

    Is it possible to add a option Today in the calendar popup view ?

Trackbacks and Pingbacks:

  1. SugarCRM Developer Blog » Blog Archive » Colorizing The Calendar - July 31, 2012

    […] Sugar Community member Michael Joyner, and talks about doing a simple customization to the Calendar recently updated in Sugar 6.4 to color the various […]

  2. change the default focus on the calendar - August 3, 2012

    […] […]

  3. Customized Calender - August 4, 2012

    […] […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s