- Allows setting empty value for date custom fields

This commit is contained in:
Vlad
2016-08-14 12:26:01 -04:00
parent 7f091d7188
commit c5a02c6136
5 changed files with 59 additions and 25 deletions

View File

@ -127,6 +127,7 @@ class Import {
if($custom_field->type === 'date') {
$data = array_map(
function($index, $date) use($validation_rule, &$invalid_records) {
if (empty($date)) return $date;
$date = Date::convertDateToDatetime($date, $validation_rule);
if(!$date) {
$invalid_records[] = $index;