Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <script>
  2.         $(document).ready(function() {
  3.             // get the current date
  4.             var date = new Date();
  5.  
  6.             var m = date.getMonth();
  7.             var d = date.getDate();
  8.             var y = date.getFullYear();
  9.        
  10.             // Disable a list of dates
  11.             var disabledDays = ["9-21-2010","9-24-2010"];
  12.             function disableAllTheseDays(date) {
  13.                 var m = date.getMonth();   
  14.                 var d = date.getDate();
  15.                 var y = date.getFullYear();
  16.  
  17.                 for (i = 0; i < disabledDays.length; i++) {
  18.                     if($.inArray((m+1) + '-' + d + '-' + y,disabledDays) != -1) {
  19.                         return [false];
  20.                     }
  21.                 }
  22.                 return [true];
  23.             }
  24.             // Disable all dates till today
  25.             $('#datepicker2').datepicker({
  26.                     minDate: new Date(y, m, d),
  27.                     dateFormat: 'yy-mm-dd',
  28.                     beforeShowDay: disableAllTheseDays
  29.             });
  30.         });
  31.     </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top