Page 1 of 2 12 LastLast
Results 1 to 10 of 13
Like Tree1Likes

Thread: calendar:how to first day of Week, change to saturday

  1. #1
    meysama is offline Junior Member
    Join Date
    Oct 2010
    Posts
    1

    Default calendar:how to first day of Week, change to saturday

    hello

    i m using sugarcrm , i m change sugar default calendar to Persian calendar but i have problem

    The first day of the week for us Saturday.

    can u help me ?

  2. #2
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    764

    Default Re: calendar:how to first day of Week, change to saturday

    Hi,

    Have a look at index.php in modules/calendar/ you should be able to code this in there, but it will not be upgrade safe.

    Not sure if you can do it in hte custom directory either.
    manishy@leosys.in likes this.
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  3. #3
    manishy@leosys.in Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Hi Chris,
    Can u tell me how to change first day of week to saturday using your code?Plz give me a way...

    Plz.help me..!!

    Thanks,
    Manish

  4. #4
    hats Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Hi Manish,

    Which edition of Sugar are you using ?

    Because in sugar professional edition, its available in user's profile -> advanced tab to change the day of the week for the calendar.

  5. #5
    manishy@leosys.in Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Hi,
    No,I am using SugarCRM 5.5.4 CE.Any help appreciated.Plz help me!!!!!

    Thanks,
    Manish

  6. #6
    manishy@leosys.in Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Hi Guys,
    It's urgent for me,how i can make Saturday as my first day of week instead of Monday in Calendar module(In Week and Shared tab) present under activities tab.
    Thanks,
    Manish

  7. #7
    utsab Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Hi, I have checked in SugarCRM CE 6.5.7, there is an option in user settings to change the First Day of the Week.

    But if you dont see it, you can make change in the code.
    Edit the file "modules/Calendar/CalendarGrid.php" (Not upgrade safe)
    In this file you need to edit the construct function.
    Edit the line "$this->startday = $current_user->get_first_day_of_week();" , make it "$this->startday = '6';"
    Thats it..
    I will advice you to do the above change in an upgrade safe manner, which requires a level of customization in Calendar module.

    Regards
    Utsab Chatterjee
    OSSCube

  8. #8
    manishy@leosys.in Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Quote Originally Posted by chrislynch8 View Post
    Hi,

    Have a look at index.php in modules/calendar/ you should be able to code this in there, but it will not be upgrade safe.

    Not sure if you can do it in hte custom directory either.

    Please give me ur way to solve this issue,may be it will not be upgrade safe way.I have to do it for week and shared tab present under calendar module of SugarCRM 5.5.4 CE.

    Thanks,
    Manish(mryekhande@gmail.com)

  9. #9
    ramendrasinghrathore@hotmail.com Guest

    Default Re: calendar:how to first day of Week, change to saturday

    Name:  First day of week.png
Views: 272
Size:  108.6 KB

    Hi
    You can change the first day of week from user preference as image shown.
    If you want to edit code than

    Make changes in CalendarUtils.php
    static function get_first_day_of_week(SugarDateTime $date){
    $fdow = $GLOBALS['current_user']->get_first_day_of_week();
    if($date->day_of_week < $fdow)
    $date = $date->get('-7 days');
    return $date->get_day_by_index_this_week($fdow);
    }
    This is not upgrade safe
    Change order of dorpdown according requirement.

    'dom_cal_day_short'=>array(
    '0'=>"",
    '1'=>"Sun",
    '2'=>"Mon",
    '3'=>"Tue",
    '4'=>"Wed",
    '5'=>"Thu",
    '6'=>"Fri",
    '7'=>"Sat",
    ),

  10. #10
    ramendrasinghrathore@hotmail.com Guest

    Default Re: calendar:how to first day of Week, change to saturday

    <?php

    // Set '1' for Monday, '0' for Sunday, or greater integer value up to '6' for another day of the week.
    $sugar_config['fdow'] = '1';

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. first day of Week, change to Monday
    By erol in forum Order Management
    Replies: 19
    Last Post: 2013-08-06, 09:18 AM
  2. The beginning of week in a calendar
    By SmilingBull in forum Help
    Replies: 4
    Last Post: 2010-04-12, 10:53 PM
  3. Calendar week view
    By timolein in forum Help
    Replies: 3
    Last Post: 2009-09-03, 09:01 PM
  4. Replies: 4
    Last Post: 2006-11-29, 11:51 PM
  5. Replies: 0
    Last Post: 2005-09-02, 09:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •