Set to use Monday as the first day of the week in JavaScript

Description

The following code shows how to set to use Monday as the first day of the week.

Example


<!--  w ww .  j av  a2s  .  c o m-->
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet" />

<script type='text/javascript'>
$(document).ready(
function() {
$('input#tmpDate').datepicker({
firstDay: 1
});
}
);
</script>

</head>
<body>

<div>
<label for='tmpDate'>Date:</label>
<input type='text' id='tmpDate' size='25' value='' />
</div>

</body>
</html>

Click to view the demo

The code above generates the following result.

Set to use Monday as the first day of the week in JavaScript