We help IT Professionals succeed at work.

jquery  datepicker

cofactor
cofactor asked
on
I am  using jquery  datepicker :

        $( "#id_disDate" ).datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'yy-mm-dd',
            numberOfMonths : 1
      });

      How do I show calnder for a specific year ?  
      
      e.g I have a javascript var year. I want to pass  this year input to the jquery datepicker.  how ?
Comment
Watch Question

Author

Commented:
In fact , I  have a  var  startDate="2012-01-09"   // 9 jan 2011

I want to show calender after this startDate so that user can not  select  earlier dates.
by default you want to show his date right??

Author

Commented:
that link talks about  prepopulation on todays date.  But thats not my case.

Well, let me pick an example:

my inputs:
var  startDate="2012-01-09"  // this will be input from my jsp
var endDate="2012-01-19"  //// this will be input from my jsp

I want my user to select date within this range only. othe dates would be disabled . how do I prepopulate the calender so that user can find selectable dates in this range only ?  

Author

Commented:
excellent