Skip to content

Commit 158e977

Browse files
KaushikChavdagelanivishal
authored andcommitted
DOBISSUE date format changed after customer tries to register with same email address.
1 parent ff550b4 commit 158e977

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
@@ -75,7 +75,7 @@ public function inputFilter($value)
7575
public function outputFilter($value)
7676
{
7777
$filterInput = new \Zend_Filter_LocalizedToNormalized(
78-
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
78+
['date_format' => DateTime::DATE_INTERNAL_FORMAT, 'locale' => $this->localeResolver->getLocale()]
7979
);
8080
$filterInternal = new \Zend_Filter_NormalizedToLocalized(
8181
['date_format' => $this->_dateFormat, 'locale' => $this->localeResolver->getLocale()]
@@ -85,4 +85,4 @@ public function outputFilter($value)
8585
$value = $filterInternal->filter($value);
8686
return $value;
8787
}
88-
}
88+
}

0 commit comments

Comments
 (0)