Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Element\DateTime format fix #172

Closed
wants to merge 3 commits into from
Closed

Conversation

Kwido
Copy link
Contributor

@Kwido Kwido commented Jul 11, 2017

The static format is now being used rendering the set format useless.

@@ -17,6 +17,7 @@ class MonthTest extends TestCase
public function testProvidesInputSpecificationThatIncludesValidatorsBasedOnAttributes()
{
$element = new MonthElement('foo');
$element->setFormat('Y-m');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format setting is wrong, because the Month element has already this format. (See also #170)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected $format = self::DATETIME_FORMAT; is missing in Zend\Form\Element\Month

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I noticed that, I had to set the format due to the missing field. Was in kinda of a rush.

@@ -17,6 +17,7 @@ class MonthTest extends TestCase
public function testProvidesInputSpecificationThatIncludesValidatorsBasedOnAttributes()
{
$element = new MonthElement('foo');
$element->setFormat('Y-m');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected $format = self::DATETIME_FORMAT; is missing in Zend\Form\Element\Month

…onger set the format for the Element\Month.
@froschdesign
Copy link
Member

Related to #168

weierophinney added a commit that referenced this pull request Dec 6, 2017
Element\DateTime format fix
weierophinney added a commit that referenced this pull request Dec 6, 2017
weierophinney added a commit that referenced this pull request Dec 6, 2017
@weierophinney
Copy link
Member

Thanks, @Kwido

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants