Skip to content

Commit c180386

Browse files
KaushikChavdahitesh-wagento
authored andcommitted
DOBISSUE date format changed after customer tries to register with same email address.
1 parent 092e6ec commit c180386

File tree

2 files changed

+3
-2
lines changed
  • app/code/Magento/Customer/Block/Widget
  • lib/internal/Magento/Framework/Data/Form/Filter

2 files changed

+3
-2
lines changed

app/code/Magento/Customer/Block/Widget/Dob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ protected function applyOutputFilter($value)
128128
{
129129
$filter = $this->getFormFilter();
130130
if ($filter) {
131+
$value = date('Y-m-d',strtotime($value));
131132
$value = $filter->outputFilter($value);
132133
}
133134
return $value;

lib/internal/Magento/Framework/Data/Form/Filter/Date.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function outputFilter($value)
8383
}
8484

8585
$filterInput = new \Zend_Filter_LocalizedToNormalized(
86-
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
86+
['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()]
8787
);
8888
$filterInternal = new \Zend_Filter_NormalizedToLocalized(
8989
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
@@ -93,4 +93,4 @@ public function outputFilter($value)
9393
$value = $filterInternal->filter($value);
9494
return $value;
9595
}
96-
}
96+
}

0 commit comments

Comments
 (0)