Question

I am using multi month Datepicker

i am unable set a date range explicitly.

for eg i have to show sep 1st 2012 to 30 aug 2012 as selected on some button click.

documentation has this method but it only select the start date

$('selector').DatePickerSetDate(date, shiftTo);

Thanks in advance.

Était-ce utile?

La solution

Found answer after going through plug-in code

$("selector").DatePickerSetDate([new Date(2012,8,1), new Date(2012,9,30)],1)

Autres conseils

Try this

$('input').datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'yy-mm-dd',
        yearRange: '1920:'
    });

hope it can help

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top