Support

Account

Home Forums Backend Issues (wp-admin) Default value for datepicker Reply To: Default value for datepicker

  • If you want to set the default value of a date field when loading a field it must be in the same format that ACF stores in the DB

    
    add_filter('acf/load_field/name=date_of_birth', function ($field) {
        $field['default_value'] = date('Ymd');
        return $field;
    });