From: Alexander Ebert Date: Sat, 20 Jun 2015 15:26:49 +0000 (+0200) Subject: `Number.isNaN()` is part of ES6 and not yet fully supported X-Git-Tag: 3.0.0_Beta_1~2258 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=507bc9afbf8a7efb5138179eed38bdfee68ea5d1;p=GitHub%2FWoltLab%2FWCF.git `Number.isNaN()` is part of ES6 and not yet fully supported --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js b/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js index 1f2d8705eb..96e57309d4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Date/Picker.js @@ -200,7 +200,7 @@ define(['DateUtil', 'Language', 'ObjectMap', 'DOM/ChangeListener', 'UI/Alignment if (value) { date = new Date(+value); - if (Number.isNaN(date.valueOf())) { + if (date.toString() === 'Invalid Date') { date = new Date(); } }