Skip to content
Snippets Groups Projects
Commit 430b2ff8 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Fix: datepicker first day of week can be monday by setting into

display setup
parent dc2bd10c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -2,6 +2,7 @@
/* Copyright (C) phpBSM
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* 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('<?php echo DOL_URL_ROOT.'/core/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>','<?php echo $langs->defaultlang ?>')">&gt;&gt;</td>
</tr>
<tr class="dpDayNames">
<?php
$startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1;
if($startday==1)
{?>
<td width="14%"><?php echo $langs->trans("ShortMonday") ?></td>
<td width="15%"><?php echo $langs->trans("ShortTuesday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortWednesday") ?></td>
<td width="15%"><?php echo $langs->trans("ShortThursday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortFriday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortSaturday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortSunday") ?></td>
<?php
}else {?>
<td width="14%"><?php echo $langs->trans("ShortSunday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortMonday") ?></td>
<td width="15%"><?php echo $langs->trans("ShortTuesday") ?></td>
......@@ -191,6 +205,8 @@ function displayBox($selectedDate,$month,$year)
<td width="15%"><?php echo $langs->trans("ShortThursday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortFriday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortSaturday") ?></td>
<?php
}?>
</tr>
<?php
//print "x ".$thedate." y";
......
......@@ -1028,6 +1028,8 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
*/
function dol_getdate($timestamp,$fast=false)
{
global $conf;
$usealternatemethod=false;
if ($timestamp <= 0) $usealternatemethod=true; // <= 1970
if ($timestamp >= 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment