Abraham Garcia in Javascript/jQuery   Friday, December 13 2019

Disable Weekday from Datepicker JS

How to disabled Friday, Saturday, or Sunday from Datepicker JS. A Simple Script

This is a snippet to disable Friday, Saturday, and Sunday on the JS Datepicker.  <script> jQuery(document).ready(function($){ jQuery("#datepicker2").datepicker({ minDate: new Date(), dateFormat: 'dd-mm-yy', beforeShowDay: function(date) { var show = true; if(date.getDay()==6||date.getDay()==0||date.getDay()==5)

Continue reading
Abraham Garcia in Javascript/jQuery   Monday, October 8 2018

Disable Array of Dates in Datepicker jQuery

How to disable days from jquery ui datepicker. A Simple solution to block out dates.

This is a code snippet on how to blockout dates for the jquery ui datepicker.  var array = ["2013-03-14","2013-03-15","2013-03-16"] $('input').datepicker({ beforeShowDay: function(date){ var string = jQuery.datepicker.formatDate('yy-mm-dd', date); return [ array.indexOf(string)

Continue reading