JQuery Datepicker Localization German

后端 未结 6 2354
醉酒成梦
醉酒成梦 2020-12-18 22:50

First off, I want to state, that I\'ve read a lot of threads on this Topic but none solved my Problem.

So I need a german JQuery Datepicker. So I set th

6条回答
  •  离开以前
    2020-12-18 23:11

    Check whether you have included the localization js file for the german

    if you not means include this

    
    

    and code should be

     $(function() {
      $('#datepicker').datepicker({
           prevText: '<zurück', prevStatus: '',
            prevJumpText: '<<', prevJumpStatus: '',
            nextText: 'Vor>', nextStatus: '',
            nextJumpText: '>>', nextJumpStatus: '',
            currentText: 'heute', currentStatus: '',
            todayText: 'heute', todayStatus: '',
            clearText: '-', clearStatus: '',
            closeText: 'schließen', closeStatus: '',
            monthNames: ['Januar','Februar','März','April','Mai','Juni',
            'Juli','August','September','Oktober','November','Dezember'],
            monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
            'Jul','Aug','Sep','Okt','Nov','Dez'],
            dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
            dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
            dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
          showMonthAfterYear: false,
          showOn: 'both',
          buttonImage: 'media/img/calendar.png',
          buttonImageOnly: true,
          dateFormat:'d MM, y'
        } 
      );
    
    });
    

    Demo

提交回复
热议问题