New features Apply a Theme In Line Events From To Button Panel Week Numbers Date and Time Misc

Single usage:

Displays year and week number if you click anywhere in the calendar.

Two methods using week numbers

The default implementation uses the ISO 8601 definition. Weeks start on a Monday; the first week of the year contains the first Thursday of the year.

Dual usage:

1. Grab the whole week by clicking week number

2. Use as normal from/to datepicker

Select Date Select Date Select Date

<script>

$(function() {

$( "#startdate" ).datepicker({

showAnim:'slideDown',

showButtonPanel: true,

numberOfMonths: 3,

showWeek: true,

defaultDate: "0",

minDate: '0',

 maxDate: '+2Y'

});

});


$(function() {


$("td.ui-datepicker-week-col").live("click", function() {         

$(this).next().click();         

var fromDate = $("#startate").datepicker("getDate");        

var toDate = fromDate;     

toDate.setDate(fromDate.getDate() + 6);     

$("#enddate").datepicker("setDate", toDate);

 });

});

</script>

<script>

$(function() {


$("#weekno").datepicker({

showAnim:'slideDown',

showButtonPanel: true,

numberOfMonths: 3,

showWeek: true

});


$(function() {


$("#weekno").datepicker("option", "onSelect",

        function(value, date)

        { var week=$.datepicker.iso8601Week (

                new Date(date.selectedYear,

                        date.selectedMonth,

                        date.selectedDay));

         $(this).val(date.selectedYear+'-week-'+(week<10?'0':'')+week);

         

       }

 );


});

});

</script>

On both of these two datepickers the week numbers do not show as hyperlinks when hovered over. If you need this feature copy and paste the following into /*Page StyleSheet*/

td.ui-datepicker-week-col{

cursor:pointer;

cusor:hand;}


For either datepicker copy and paste the relevant script from below into <!--Page  Start--> using Alt-S or right click>Attach HTML.

Change the ID of the datepickers (marked in red) to your datepickers.

The options in the first part of the scripts can be varied to suit. Each of the option lines has a comma at the end EXCEPT the last item. If you delete any  lines make sure that you follow this pattern.