1const CUSTOM_DATE_INPUT_SETTINGS = { 2 month_names: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], 3 short_month_names: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], 4 short_day_names: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 5 stringToDate: function(string) { 6 let matches; 7 if (matches = string.match(/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/)) { 8 return new Date(Number(matches[3]), Number(matches[2]) - 1, Number(matches[1])); 9 } else { 10 return null; 11 }; 12 }, 13 dateToString: function(date) { 14 let month = (date.getMonth() + 1).toString(); 15 let dom = date.getDate().toString(); 16 return String(dom).padStart(2, "0") + "." + String(month).padStart(2, "0") + "." + date.getFullYear(); 17 }, 18 show: function () { 19 this.rootLayers.css("display", "block"); 20 this.setPosition(); 21 this.input.off("focus"); 22 this.input.on("keydown", this.hide); 23 $([window, document.body]).on("click",this.hideIfClickOutside); 24 }, 25 hide: function (e) { 26 // Falls das event keydown war und nicht TAB wird hide Funktion abgebrochen. 27 if(e && e.type === 'keydown' && e.keyCode !== 9) return; 28 this.rootLayers.css("display", "none"); 29 $([window, document.body]).off("click", this.hideIfClickOutside); 30 this.input.on("focus",this.show); 31 this.input.off("keydown"); 32 }, 33}; 34 35/** 36 * Initialisiert das date_input-Plugin mit CUSTOM Settings, sodass es mit dem FN2-Datums-Format kompatibel ist 37 * @param target Input-Feld, dem der Date-Picker zugewiesen werden soll. 38 */ 39function initDateInput(target) { 40 target.date_input(CUSTOM_DATE_INPUT_SETTINGS); 41}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.