daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Jun 23rd, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery.extend(DateInput.DEFAULT_OPTS, {
  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.  
  6.       stringToDate: function(string) {
  7.         var matches;
  8.         if (matches = string.match(/^(\d{2,2}).(\d{2,2}).(\d{4,4})$/)) {
  9.           return new Date(matches[3], matches[2] - 1, matches[1]);
  10.         } else {
  11.           return null;
  12.         };
  13.       },
  14.       dateToString: function(date) {
  15.         var month = (date.getMonth() + 1).toString();
  16.         var dom = date.getDate().toString();
  17.         if (month.length == 1) month = "0" + month;
  18.         if (dom.length == 1) dom = "0" + dom;
  19.         return dom + "." + month + "." + date.getFullYear() ;
  20.       },
  21.  
  22.       show: function() {
  23.               if($('#edit-start-day').val().length>4){
  24.                 this.selectedDate = this.stringToDate($('#edit-start-day').val());
  25.                 this.selectedDateString = this.dateToString(this.stringToDate($('#edit-start-day').val()));
  26.                 this.selectMonth(this.selectedDate);
  27.               }
  28.             this.rootLayers.css("display", "block");
  29.             $([window, document.body]).click(this.hideIfClickOutside);
  30.             this.input.unbind("focus", this.show);
  31.             $(document.body).keydown(this.keydownHandler);
  32.             this.setPosition();
  33.           },
  34. });;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top