najlepsiwebdesigner / foundation-datepicker

Foundation datepicker jQuery plugin
http://foundation-datepicker.peterbeno.com
Apache License 2.0
442 stars 269 forks source link

Past Dates can still be picked through time picker. #242

Open TNChalise opened 5 years ago

TNChalise commented 5 years ago

Steps to reproduce:

 var nowTemp = new Date();
 var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);

 $('.datetime-later').fdatepicker({
   onRender: function(date) {
     return date.valueOf() < now.valueOf() ? 'disabled' : '';
   },
   format: 'dd-mm-yyyy hh:ii',
   disableDblClickSelection: true,
   pickTime: true,
 });

We will be able to select past dates from date picker even if its disabled on render.

If there any way to address the problem with disabling past times as well ?