From 7e00821d5bba113124f3273ada7f9209c12683fd Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Fri, 28 Dec 2018 17:29:56 +0100 Subject: [PATCH 1/2] Issue 520: Allow to modify Date.format in the main common.js file --- licensing/js/common.js | 8 -------- licensing/templates/header.php | 1 + management/js/common.js | 7 ------- management/templates/header.php | 1 + organizations/js/common.js | 5 ----- organizations/templates/header.php | 1 + resources/js/common.js | 3 --- resources/templates/header.php | 1 + 8 files changed, 4 insertions(+), 23 deletions(-) diff --git a/licensing/js/common.js b/licensing/js/common.js index a48116c76..a2cd37b1d 100644 --- a/licensing/js/common.js +++ b/licensing/js/common.js @@ -30,14 +30,6 @@ })(jQuery) - -//Required for date picker -Date.firstDayOfWeek = 0; - -//suggested: mm/dd/yyyy OR dd-mm-yyyy -Date.format = 'mm/dd/yyyy'; - - $(function(){ $('.date-pick').datePicker({startDate:'01/01/1996'}); diff --git a/licensing/templates/header.php b/licensing/templates/header.php index 13315ec83..bfaec75cd 100644 --- a/licensing/templates/header.php +++ b/licensing/templates/header.php @@ -79,6 +79,7 @@ + diff --git a/management/js/common.js b/management/js/common.js index 3abf90647..81bdda45a 100644 --- a/management/js/common.js +++ b/management/js/common.js @@ -32,13 +32,6 @@ -//Required for date picker -Date.firstDayOfWeek = 0; - -//suggested: mm/dd/yyyy OR dd-mm-yyyy -Date.format = 'mm/dd/yyyy'; - - $(function(){ loadDatePicker(); diff --git a/management/templates/header.php b/management/templates/header.php index 8825e2f44..4142af7ee 100644 --- a/management/templates/header.php +++ b/management/templates/header.php @@ -78,6 +78,7 @@ + diff --git a/organizations/js/common.js b/organizations/js/common.js index 321d57efa..7af873587 100644 --- a/organizations/js/common.js +++ b/organizations/js/common.js @@ -30,11 +30,6 @@ })(jQuery) -//Required for date picker -Date.firstDayOfWeek = 0; -Date.format = 'mm/dd/yyyy'; - - $(function(){ refreshContext(); diff --git a/organizations/templates/header.php b/organizations/templates/header.php index 9d08c111b..97810a0cb 100644 --- a/organizations/templates/header.php +++ b/organizations/templates/header.php @@ -72,6 +72,7 @@ + diff --git a/resources/js/common.js b/resources/js/common.js index 68d5645d3..a3213b953 100644 --- a/resources/js/common.js +++ b/resources/js/common.js @@ -33,9 +33,6 @@ //Required for date picker Date.firstDayOfWeek = 0; -//suggested: mm/dd/yyyy OR dd-mm-yyyy -Date.format = 'mm/dd/yyyy'; - $(function(){ refreshContext(); diff --git a/resources/templates/header.php b/resources/templates/header.php index 54b7136f9..f18445662 100644 --- a/resources/templates/header.php +++ b/resources/templates/header.php @@ -70,6 +70,7 @@ + From 306a66a2432eb2fa1720cd9b9e274cb048ecd3aa Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Fri, 11 Jan 2019 16:27:03 +0100 Subject: [PATCH 2/2] Issue 520: Use Date.format for date placeholders in cost form. --- resources/js/forms/costForm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/js/forms/costForm.js b/resources/js/forms/costForm.js index d16877e69..3ebf27035 100644 --- a/resources/js/forms/costForm.js +++ b/resources/js/forms/costForm.js @@ -16,7 +16,10 @@ */ $(function(){ + + $('.date-pick').datePicker({startDate:'01/01/1996'}); + $('.date-pick').attr('placeholder', Date.format); //bind all of the inputs