简体   繁体   中英

Jquery UI Datepicker Widget change in Date format

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();
  });

Try setting firstDay property

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

Demo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM