Bug 18447 - Datepicker only shows -10/+10 years

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 <veron@veron.ch>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2017-04-18 10:57:20 -04:00 committed by Jonathan Druart
parent 01e02364c9
commit 6cbe9abcc8
1 changed files with 6 additions and 1 deletions

View File

@ -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({