From 6cbe9abcc88dcfbcf495a5d39d4b4de00858080e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 18 Apr 2017 10:57:20 -0400 Subject: [PATCH] Bug 18447 - Datepicker only shows -10/+10 years MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch makes 2 changes: 1 - Global datepicker defaulted to c-100:c+10 2 - Dateofbirth datepicker defaulted to c-100:c To test: 1 - Open some date pickers (patron entry, subscriptions, anywhere really) - Make sure to check some dateofbirth datepickers 2 - Note that default is 10 years in either direction, updated when you select 3 - Apply patch 4 - Note we now get -100 years / +10 years from current selection 5 - Now find a dateofbirth datepicker and note default is -100:+0 6 - Sign off Signed-off-by: Marc Véron Signed-off-by: Josef Moravec Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index a4bbe627c6..f13a1fa4a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -135,7 +135,12 @@ $.datepicker.setDefaults({ buttonImageOnly: true, showButtonPanel: true, showOtherMonths: true, - selectOtherMonths: true + selectOtherMonths: true, + yearRange: "c-100:c+10" + }); + +$("#dateofbirth").datepicker({ + yearRange: "c-100:c" }); $( ".datepicker" ).datepicker({ -- 2.39.5