Man, my employer's client is getting picky! I put together this great jQuery datepicker (with the helpful assistance from some of you, here) with this code:
- $(function() {
- $('#dateWeekly').datepicker({
- showOn: 'both',
- buttonImage: 'childtime/images/calendar.gif',
- buttonImageOnly: true,
- buttonText: 'Show Calendar',
- numberOfMonths: 3,
- showButtonPanel: true,
- minDate: -0, maxDate: '+12M',
- beforeShowDay: function(date){ return [date.getDay() == 1,""]}
- });
- });
This creates a great 3-month datepicker with only Monday enabled for the current and future weeks. Now the client tells us they want the Monday of the current week disabled if (and only if) today's day is Monday!
(For example, if today is Sunday, the Monday of this week can be picked, but if today is Monday, the Monday of this week cannot be picked.) If anyone has an idea how to modify the code, I will be truly grateful.