parmarmayur9090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

jQuery Calendar With Date Range #350

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Dear Kelvin,

Is it possible if We want to set the jQuery Calendar with date range ?
Example :

Allow 1 week before, start from today.
So if today date : 12-Jun-2012, it will allow date range from 5-Jun-2012 until 
11-Jun-2012. Others will be block.

Thank you,
Regards,
David

Original issue reported on code.google.com by data...@gmail.com on 12 Jun 2012 at 6:25

GoogleCodeExporter commented 8 years ago
Yes - this is easy. Something like:

$(function()
{
    $('.date-pick').datePicker(
        {
            startDate: (new Date()).addDays(-8).asString(),
            endDate: (new Date()).addDays(-1).asString()
        }
    );
});

Original comment by kelvin.l...@gmail.com on 12 Jun 2012 at 10:14