Manfred,

I can't think of an easy way to do this.  There is an option to show
multiple months by columns/rows, so you could use the second option I
gave.  It would take a lot of hacking to just show one month at a time
and skip empty months as you suggest.

Something like this would get you close using the second option (for 5
months):

  $("#datepicker").datepicker({
    numberOfMonths: [2,3],
    stepMonths: 12,
    defaultDate: new Date(new Date().getFullYear(),7,1),
    beforeShowDay:  function(date) {return [(date.getMonth()>6 &&
date.getMonth()<12),""]; }
  });

Hth,

Dave

On Oct 26, 8:43 am, isip <roeh...@isip.de> wrote:
> Hi Dave,
>
> thanks a lot for your help - you have fully understood my request :-)
>
> Both demos do exactly what they should. I like demo 1 because I have
> other instances where the range is larger than three months. Letting
> five or six months fly out like in demo 2 might be confusing.
>
> One thing I have with demo 1: I would like the invalid months not only
> greyed out but not shown.
>
> Taking my example, one solution could be, that if I hit the 'prev'
> button in Aug 2009 the calendar would jump to the next valid month -
> Oct 2008.
>
> Another possibility could be that 'next/prev' buttons only scroll
> through the valid months, and the 'next/prev year' buttons only scroll
> through the valid years.
>
> Any suggestions?
>
> Manfred
>
> On Oct 23, 6:48 pm, Fontzter <dmfo...@gmail.com> wrote:
>
> > If I understand your request, one of these two should work:
>
> >   $("#datepicker").datepicker({
> >     minDate: new Date(2007,7,1),
> >     maxDate: new Date(2009,9,31),
> >     beforeShowDay:  function(date) {return [(date.getMonth()>6 &&
> > date.getMonth()<10),""]; }
> >   });
>
> >   $("#datepicker3").datepicker({
> >     numberOfMonths: 3,
> >     stepMonths: 12,
> >     minDate: new Date(2007,7,1),
> >     maxDate: new Date(2009,9,31),
> >     beforeShowDay:  function(date) {return [(date.getMonth()>6 &&
> > date.getMonth()<10),""]; }
> >   });
>
> > See demo here:http://jsbin.com/obuqu/edit
>
> > Hth,
>
> > Dave
>
> > On Oct 23, 4:13 am, isip <roeh...@isip.de> wrote:
>
> > > Hi,
>
> > > in my application, I want to use the Datepicker. The user should be
> > > able to select a three-month range within the last three years, e.g.
> > > from 01/08 to 31/10 in the years 2007 to 2009.
>
> > > How do I achieve that?
>
> > > Thanks for your help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to