You are here

function date_field_field_is_empty in Date 8

Implements hook_field_is_empty().

File

date_field/date_field.module, line 67

Code

function date_field_field_is_empty($item, $field) {
  if (empty($item['value'])) {
    return TRUE;
  }
  elseif ($field['settings']['todate'] == 'required' && empty($item['value2'])) {
    return TRUE;
  }
  return FALSE;
}