• Hello,

    I am using Ninja Forms for a contact form and am using the datepicker field. I need to restrict past dates. Can anyone help me how to do that?

    I googled this a lot and for someone this code worked but I don’t seem to get it working, can anyone help?

    function nf_datepicker_modify_script( $args ){
    //for a list of arguments which can be used here, see the options here https://api.jqueryui.com/datepicker/
    
        $args['minDate'] = 0
        return $args;
    }
    
    add_filter( 'ninja_forms_forms_display_datepicker_args'
    ,'nf_datepicker_modify_script' );
    • This topic was modified 3 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Restrict past dates in ninja forms datepicker’ is closed to new replies.