CodeExplorer checkEmptyInputs example
public static function valueCallback(&
$element,
$input, FormStateInterface
$form_state) { $parts =
$element['#date_part_order'
];
$increment =
$element['#date_increment'
];
$date = NULL;
if ($input !== FALSE
) { $return =
$input;
if (empty(static::
checkEmptyInputs($input,
$parts))) { if (isset($input['ampm'
])) { if ($input['ampm'
] == 'pm' &&
$input['hour'
] < 12
) { $input['hour'
] += 12;
} elseif ($input['ampm'
] == 'am' &&
$input['hour'
] == 12
) { $input['hour'
] -= 12;
} unset($input['ampm'
]);
} try { $date = DrupalDateTime::
createFromArray($input,
$element['#date_timezone'
]);
}