Skip to content

Commit

Permalink
Fix errors when DOB field is visible. #12146
Browse files Browse the repository at this point in the history
 - Fix customer create page rendering
 - Fix customer save in backend and frontend
  • Loading branch information
vovayatsyuk authored and rostyslav-hymon committed Apr 12, 2018
1 parent d7352dd commit 4801d74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/internal/Magento/Framework/Data/Form/Filter/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public function __construct(
*/
public function inputFilter($value)
{
if (!$value) {
return $value;
}

$filterInput = new \Zend_Filter_LocalizedToNormalized(
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
);
Expand All @@ -74,6 +78,10 @@ public function inputFilter($value)
*/
public function outputFilter($value)
{
if (!$value) {
return $value;
}

$filterInput = new \Zend_Filter_LocalizedToNormalized(
['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()]
);
Expand Down

0 comments on commit 4801d74

Please sign in to comment.