• I’ve been having trouble getting the default date to work with your plugin. I set a default date using the field settings, but it had no effect. I then tried my preferred method, which is to set the default to the first day of the following year for form 14, field 19 by adding the following (from your faq) to my functions.php:

    add_filter( 'itsg_datepicker_fields', function ( $datepicker_fields, $form_id ) {
        if ( 14 == $form_id ) {
            $datepicker_fields['19'] = array( '1' => date( 'm/d/Y', strtotime( 'first day of January next year' ) ) );
        }
        return $datepicker_fields;
    }, 10, 2);

    This also had no effect. Can you help?

    The form is at:
    https://yearbox.staging.wpengine.com/customize-calendar/

    (page 3 of form) —?you’ll need to create a login to view the form.

    Thanks,

    Pete

  • The topic ‘Default Date not working’ is closed to new replies.