Page 1 of 1

Restrict the range of datepicker using minDate and maxDate

Posted: Mon Feb 04, 2013 7:43 am
by yllaw

how to restrict the range of selectable dates with the minDate and maxDate options?

I using this code:

$( "mobiledatepicker1" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
but still not working whenever I tried to test the date picker.

any idea guys?...


Restrict the range of datepicker using minDate and maxDate

Posted: Mon Feb 04, 2013 9:20 am
by Maryna Brodina

Hello! You can range it using Properties section. Take a look at the screenshots

Image

Image


Restrict the range of datepicker using minDate and maxDate

Posted: Mon Feb 04, 2013 10:11 am
by yllaw

yes, I tried your sample but what I want to do is just to go previous 20Days only and the rest of the previous days/months are already disable.

I tried to set my date to December and when I test, it can go to previous months not only November but it goes thru February

can you check this sample link http://jqueryui.com/datepicker/#min-max

they have sample that can restrict minDate by days/months and my problem I can't apply the sample code given... thanks in advance...


Restrict the range of datepicker using minDate and maxDate

Posted: Mon Feb 04, 2013 11:13 am
by Maryna Brodina

Try next code:
codeTiggzi("date1").datepicker_dataPickerOptions.maxDate = "+1M +10D&quot
Tiggzi("date1").datepicker_dataPickerOptions.minDate = -20;
Tiggzi("date1").initializeDataPicker()/code

date1 - name of datepicker component


Restrict the range of datepicker using minDate and maxDate

Posted: Tue Feb 05, 2013 9:36 am
by yllaw

thanks Marina it's working...