Skip to content

Commit f7a2c9e

Browse files
committed
+ JS → jQuery.ddMM.dateNowFormatted: The new property. Contains formatted current date.
1 parent d4292d0 commit f7a2c9e

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

assets/plugins/managermanager/js/jquery.ddMM.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jQuery ddMM Plugin
3-
* @version 1.4 (2024-01-03)
3+
* @version 1.5 (2024-01-04)
44
*
55
* @uses jQuery 1.9.1
66
*
@@ -15,6 +15,8 @@ $.ddMM = {
1515
datepicker_offset: 0
1616
},
1717

18+
dateNowFormatted: '',
19+
1820
urls: {
1921
manager: 'manager/',
2022
mm: 'assets/plugins/managermanager/'

assets/plugins/managermanager/mm.inc.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
'assets/plugins/managermanager/js/jquery.ddMM.js'
8585
,
8686
'name' => 'ddMM',
87-
'version' => '1.4'
87+
'version' => '1.5.0'
8888
],
8989
'ddTools' => [
9090
'url' =>
@@ -497,6 +497,22 @@ function ManagerManger_initJQddMM(){
497497
$j.ddMM.config.site_url = "' . $modx->getConfig('site_url') . '";
498498
$j.ddMM.config.datetime_format = "' . $modx->getConfig('datetime_format') . '";
499499
$j.ddMM.config.datepicker_offset = ' . $modx->getConfig('datepicker_offset') . ';
500+
$j.ddMM.dateNowFormatted = "' . date(
501+
str_replace(
502+
[
503+
'YYYY',
504+
'mm',
505+
'dd',
506+
],
507+
[
508+
'Y',
509+
'm',
510+
'd',
511+
],
512+
$modx->config['datetime_format']
513+
) .
514+
' H:i:s'
515+
). '";
500516
501517
$j.ddMM.lang.dp_dayNames = ' . $_lang['dp_dayNames'] . ';
502518
$j.ddMM.lang.dp_monthNames = ' . $_lang['dp_monthNames'] . ';

0 commit comments

Comments
 (0)