Frage

I am using jquery UI datepicker in one of my page, as a default setting it shows calender starts on Sunday and ends on Saturday. Can I change this? I want it to be like starting on Monday and ending on Sunday. Is it possible? My code is like this JSFiddle

  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<p>Date: <input type="text" id="datepicker"></p>

      $(function() {
    $( "#datepicker" ).datepicker();
  });
War es hilfreich?

Lösung

Try setting firstDay property

$(function() {
    $( "#datepicker" ).datepicker( {firstDay: 1});        
});

Demo

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top