rakeshpatel2009 / jquery-datepicker

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

Dates in the past selectable with Date.format set to dd mmm yyyy #295

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I can get the calender to allow dates in the past to be selectable but not in 
the date format I require. What do I need to do to get the format dd mmm yyyy 
showing for dates in the past, The code I am using from your sample is:

$(function()
{
    $('.date-pick').datePicker({startDate:'01/01/1996'});
});

I am using version 2.

Original issue reported on code.google.com by mad2...@gmail.com on 19 Jul 2011 at 8:51

GoogleCodeExporter commented 8 years ago
You need to set the startDate in the same format as you set Date.format to... 
e.g. startDate: '01 Jan 1996'

Original comment by kelvin.l...@gmail.com on 19 Jul 2011 at 8:54

GoogleCodeExporter commented 8 years ago
Hi,

When I change the code as you have suggested the calendar button does not
show.

$(function()
{
    $('.date-pick').datePicker({startDate:'01 Jan 1996'});
});

Thanks in advance.

Mark

DM Balloon Company
www.dmballooncompany.com
Tel: (+44) 1482861117
Mob: (+44) 7877337879

Original comment by mad2...@gmail.com on 19 Jul 2011 at 9:07

GoogleCodeExporter commented 8 years ago
Hi,

Now sorted it by doing what you suggested and adding:

Date.firstDayOfWeek = 0;
Date.format = 'dd mmm yyyy';

Many thanks.

Mark

DM Balloon Company
www.dmballooncompany.com
Tel: (+44) 1482861117
Mob: (+44) 7877337879

Original comment by mad2...@gmail.com on 19 Jul 2011 at 9:17