문제

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.

도움이 되었습니까?

해결책

Found answer after going through plug-in code

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

다른 팁

Try this

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

hope it can help

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top