From 57a11a458bd37a2ef34b3b7bb21458fa316deaf2 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=UTF-8 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 --- 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 a4bbe62..f13a1fa 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.1.4