Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
430b2ff8
Commit
430b2ff8
authored
10 years ago
by
Juanjo Menent
Browse files
Options
Downloads
Patches
Plain Diff
Fix: datepicker first day of week can be monday by setting into
display setup
parent
dc2bd10c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
htdocs/core/datepicker.php
+16
-0
16 additions, 0 deletions
htdocs/core/datepicker.php
htdocs/core/lib/functions.lib.php
+15
-0
15 additions, 0 deletions
htdocs/core/lib/functions.lib.php
with
32 additions
and
0 deletions
ChangeLog
+
1
−
0
View file @
430b2ff8
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/datepicker.php
+
16
−
0
View file @
430b2ff8
...
...
@@ -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
?>
')"
>
>>
</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";
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/lib/functions.lib.php
+
15
−
0
View file @
430b2ff8
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment