Default value: Blank
Default value for To date: Blank
To Date: Never
Granularity: Year

create a new node, and leave year field null. Upon node creation year is set to now (2009).

Comments

vm’s picture

it may help Karen to explain what you expect? no year set, if left blank?

mikeytown2’s picture

I leave the field blank, and the year gets set to 2009. Edit the node, delete the year and year gets set to 2009.

vm’s picture

that would mean the answer is yes. You expect the year field to remain empty if left empty.

have you tested against the stable release of date-2.0?
have you tested 6.x-dev to ensure this hasn't already been fixed? There are multiple fixes already in -dev awaiting the next release.

mikeytown2’s picture

K will test

mikeytown2’s picture

Version: 6.x-2.0-rc6 » 6.x-2.x-dev

No Fix in dev. Yes I would like it to respect the default value set in admin/content/node-type/*/fields/field_*. Sorry about not answering your question the first time.

Here's the export with only this field selected

$content[type]  = array (
  'name' => 'Inventory',
  'type' => 'inventory',
  'description' => 'add inventory',
  'title_label' => 'Title',
  'body_label' => '',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'revision' => true,
    'promote' => false,
    'sticky' => false,
  ),
  'upload' => '1',
  'nodewords' => 1,
  'search_block' => '0',
  'old_type' => 'inventory',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'ant' => '1',
  'ant_pattern' => '[field_manufacturer-term] - [field_model-formatted] [field_years-view]',
  'ant_php' => 0,
  'xmlsitemap_node_type_priority' => '0.4',
  'xmlsitemap_old_priority' => '0.4',
);
$content[fields]  = array (
  0 => 
  array (
    'label' => 'Year',
    'field_name' => 'field_years',
    'type' => 'date',
    'widget_type' => 'date_text',
    'change' => 'Change basic information',
    'weight' => '100',
    'default_value' => 'blank',
    'default_value2' => 'blank',
    'default_value_code' => '',
    'default_value_code2' => '',
    'input_format' => 'Y-m-d H:i:s',
    'input_format_custom' => '',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'increment' => '10',
    'year_range' => '-50:+3',
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
    'description' => '',
    'group' => 'group_extra_info',
    'required' => 0,
    'multiple' => '0',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => 'year',
    ),
    'default_format' => 'field_years_long',
    'tz_handling' => 'none',
    'timezone_db' => '',
    'op' => 'Save field settings',
    'module' => 'date',
    'widget_module' => 'date',
    'columns' => 
    array (
      'value' => 
      array (
        'type' => 'varchar',
        'length' => 20,
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' => 
    array (
      'weight' => '100',
      'parent' => 'group_extra_info',
      'label' => 
      array (
        'format' => 'inline',
      ),
      'teaser' => 
      array (
        'format' => 'field_years_long',
        'exclude' => 0,
      ),
      'full' => 
      array (
        'format' => 'field_years_long',
        'exclude' => 0,
      ),
      2 => 
      array (
        'format' => 'long',
        'exclude' => 0,
      ),
      3 => 
      array (
        'format' => 'long',
        'exclude' => 0,
      ),
      'token' => 
      array (
        'format' => 'long',
        'exclude' => 0,
      ),
      4 => 
      array (
        'format' => 'long',
        'exclude' => 0,
      ),
    ),
  ),
);
$content[extra]  = array (
  'title' => '3',
  'menu' => '2',
  'taxonomy' => '4',
  'attachments' => '15',
  'taxonomy_field_2' => '9',
  'taxonomy_field_4' => '6',
  'taxonomy_field_9' => '10',
  'taxonomy_field_6' => '7',
  'taxonomy_field_7' => '8',
  'taxonomy_field_1' => '11',
  'taxonomy_field_3' => '5',
  'taxonomy_field_12' => '12',
);
mikeytown2’s picture

I was using stable 2.0, sorry about the mis tag

mikeytown2’s picture