How do I disable sundays in the datepicker?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #99311
    innonet
    Member

    How do I disable sundays in the datepicker?

    Thanks.

    #99312
    innonet
    Member

    Fixed by changing alg-datepicker.js to:

    /**
     * alg-datepicker.
     *
     * @version 1.0.0
     * @since   1.0.0
     */
    function disableSUNDAYS(date) {
    	var day = date.getDay();
    	return [(day != 0), ''];
    }
    jQuery(document).ready(function() {
    	jQuery("input[display='date']").each( function () {
    		jQuery(this).datepicker({
    			dateFormat : jQuery(this).attr("dateformat"),
    			minDate : jQuery(this).attr("mindate"),
    			maxDate : jQuery(this).attr("maxdate"),
    			firstDay : jQuery(this).attr("firstday"),
    			changeYear: jQuery(this).attr("changeyear"),
    			yearRange: jQuery(this).attr("yearrange"),
    			beforeShowDay: disableSUNDAYS
    		});
    	});
    });
    #99313
    skragglies
    Member

    Any idea how to disable both Saturday and Sunday?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Product Input Fields for WooCommerce’ is closed to new topics and replies.