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

getValue() for MonthSelect, DateSelect and DateTimeSelect Form Elements #4756

Closed
wants to merge 7 commits into from

Conversation

richardjennings
Copy link
Contributor

Tests added to check it is possible to get the value set on a DateTime,Date or Month Select Form Element.

getValue() methods implemented for each DateTime,Date and Month Select Form Elements using sprintf to return the designated format.

Fixes Issue #4755

@tca3
Copy link
Contributor

tca3 commented Jun 30, 2013

I reckon they should return DateTime objects, which would make more sense IMHO.

@richardjennings
Copy link
Contributor Author

@ThomasCantonnet
The return format is specified already as a filter callback in getInputSpecification()

For example $form->getData() will return 'year-month-day' for a DateSelect Element ( here )

The getValue() implementations added return a format identical to $form->getData();

@ghost ghost assigned weierophinney Jul 1, 2013
weierophinney added a commit that referenced this pull request Jul 1, 2013
getValue() for MonthSelect, DateSelect and DateTimeSelect Form Elements
weierophinney added a commit that referenced this pull request Jul 1, 2013
@weierophinney
Copy link
Member

Merged to develop for release with 2.3.0, as it's a slight behavior change, and I want folks to test this a bit before we offer it in a release.

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

Successfully merging this pull request may close these issues.

3 participants