2

I want to set up Zebra datepicker plugin in a way that it has enabled all past dates up to certain specified date. I found out this stackoverflow post that explains how to do that if that border date is today. But, if the border date is lets say 1 month in the past or so, how should I define the "direction" option?

So basically I want to restrict date selection from the "beginning of time" up to some specified date.

Thank you

1 Answers1

1

As you can see they described it in the documentation. Try out this code:

$('#datepicker-example5').Zebra_DatePicker({
  // remember that the way you write down dates
  // depends on the value of the "format" property!
  direction: ['2012-08-01', '2012-08-12']
});

The example is listed in topic "Demos" (Sub-Topic 5) here: http://stefangabos.ro/jquery/zebra-datepicker/

etalon11
  • 895
  • 2
  • 13
  • 36
  • "I want to restrict date selection from the "beginning of time" up to some specified date". I wanted something like this [any point since the beginning of time, specified date]. And this seems rather impossible to do with Zebra datepicker. You need to specify a beginning date in this case and I did a "hack" with that and specified a date far in the past. At least it seems like a hack to me... that you need to hardcode a date when you just want all dates up to specified one enabled. – user2461067 Jan 08 '16 at 09:24