acf-field-date-time-picker icon indicating copy to clipboard operation
acf-field-date-time-picker copied to clipboard

Field not saving when WPLANG is set and translation files are available for set locale.

Open SeenNotHurd opened this issue 10 years ago • 3 comments

If I use the field with WPLANG set to blank or set to any language where there are no translation files, the field saves fine (timestamp).

If I set the language in WPLANG and have the files (in my project's case, fi_FI) the field saves as blank.

Incidentally if I don't save/retrieve as timestamp then it works fine no matter what language.

Possibly something the way translations are being applied to these fields?

// Event Time
  register_field_group(array (
    'id' => 'acf_event-time',
    'title' => 'Event Time',
    'fields' => array (
      array (
        'key' => 'field_5331c8494fb07',
        'label' => 'Starts:',
        'name' => 'start_date',
        'type' => 'date_time_picker',
        'required' => 1,
        'show_date' => 'true',
        'date_format' => 'dd M yy',
        'time_format' => 'H.mm',
        'show_week_number' => 'false',
        'picker' => 'select',
        'save_as_timestamp' => 'true',
        'get_as_timestamp' => 'true',
      ),
      array (
        'key' => 'field_5331c8734fb08',
        'label' => 'Ends:',
        'name' => 'end_date',
        'type' => 'date_time_picker',
        'show_date' => 'true',
        'date_format' => 'dd M yy',
        'time_format' => 'H.mm',
        'show_week_number' => 'false',
        'picker' => 'select',
        'save_as_timestamp' => 'false',
        'get_as_timestamp' => 'false',
      ),
    ),
    'location' => array (
      array (
        array (
          'param' => 'post_type',
          'operator' => '==',
          'value' => 'gp_event',
          'order_no' => 0,
          'group_no' => 0,
        ),
      ),
    ),
    'options' => array (
      'position' => 'side',
      'layout' => 'default',
      'hide_on_screen' => array (
      ),
    ),
    'menu_order' => 0,
  ));

SeenNotHurd avatar May 22 '14 07:05 SeenNotHurd