JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-darkness/jquery-ui.css">
<p>Date:
<div id="datepicker"></div>
</p>
JavaScript
/*$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
yearRange:"-90:+0",
showOn: "both",
/* buttonImage: "http://jqueryui.com/demos/datepicker/images/calendar.gif", //my gif is here
buttonImageOnly: true
});*/
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
calculateWeek: fisc,
/* maxDate: '08/25/12',
minDate: '08/28/11',*/
showWeek: true
});
function fisc(date) {
var checkDate = new Date(date.getTime());
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
var time = checkDate.getTime();
checkDate.setMonth(7);
checkDate.setDate(28);
var week = (Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 2);
if (week < 1) {
week = 52 + week;
}
return 'FW: '+week;
}