diff --git a/ChangeLog b/ChangeLog index a5d67d88d7f..09061bda629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -103,6 +103,7 @@ For users: - Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message - Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe. - Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown +- Fix: datepicker first day of week can be monday by setting into display setup For users, new experimental module (need to set feature level of instance to experimental to see them): - New: Module Accounting Expert to manage accountancy diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 67af3c7e083..7c5c4898fce 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -2,6 +2,7 @@ /* Copyright (C) phpBSM * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2014 Juanjo Menent * * This file is a modified version of datepicker.php from phpBSM to fix some * bugs, to add new features and to dramatically increase speed. @@ -184,6 +185,19 @@ function displayBox($selectedDate,$month,$year) onClick="loadMonth('','','','','defaultlang ?>')">>> + global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1; + if($startday==1) + {?> + trans("ShortMonday") ?> + trans("ShortTuesday") ?> + trans("ShortWednesday") ?> + trans("ShortThursday") ?> + trans("ShortFriday") ?> + trans("ShortSaturday") ?> + trans("ShortSunday") ?> + trans("ShortSunday") ?> trans("ShortMonday") ?> trans("ShortTuesday") ?> @@ -191,6 +205,8 @@ function displayBox($selectedDate,$month,$year) trans("ShortThursday") ?> trans("ShortFriday") ?> trans("ShortSaturday") ?> + = 2145913200) $usealternatemethod=true; // >= 2038 @@ -1039,6 +1041,19 @@ function dol_getdate($timestamp,$fast=false) else { $arrayinfo=getdate($timestamp); + + $startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1; + if($startday==1) + { + if ($arrayinfo["wday"]==0) + { + $arrayinfo["wday"]=6; + } + else + { + $arrayinfo["wday"]=$arrayinfo["wday"]-1; + } + } } return $arrayinfo;