Changed date range for birthday input
authorAlexander Ebert <ebert@woltlab.com>
Mon, 26 Sep 2016 16:05:37 +0000 (18:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 26 Sep 2016 16:05:37 +0000 (18:05 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js

index c9ef3b2e88a0578f62fe57d7318c509882588ac8..79a2835b6f80422ca645ee3ac3baee942e344627 100644 (file)
@@ -76,7 +76,9 @@ define(['DateUtil', 'Language', 'ObjectMap', 'Dom/ChangeListener', 'Ui/Alignment
                                // handle birthday input
                                if (element.classList.contains('birthday')) {
                                        elData(element, 'min-date', '100');
-                                       elData(element, 'max-date', 'now');
+                                       
+                                       // do not use 'now' here, all though it makes sense, it causes bad UX 
+                                       elData(element, 'max-date', new Date().getFullYear() + '-12-31');
                                }
                                else {
                                        if (element.min) elData(element, 'min-date', element.min);