innonet

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: How do I disable sundays in the datepicker? #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
    		});
    	});
    });
Viewing 1 post (of 1 total)