Home Forums Front-end Issues Set datepicker fields to not show weekends


Set datepicker fields to not show weekends

  • I’m trying to set up some datepicker fields on a front end form to only show weekdays (i.e. no weekends shown). I’ve been trying to use the javascript filters for ACF in my theme’s footer like so `
    acf.add_filter(‘date_picker_args’, function( args, $field ){

    // do something to args
    //my code which so far isn’t working
    args = { beforeShowDay: $.datepicker.noWeekends }

    // return
    return args;

    I keep getting “TypeError: Cannot read property ‘datepicker’ of undefined” which I think means I’m not passing in the correct field parameter(s)? How should I be doing this? Thanks in advance for your assistance!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.