ActiveDateList creates dropdown lists from a date string. For configuration examples, please see the examples for the $displayFormat property.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.1.1 or above
Installation ¶
- Extract the release file under
protected/extensions
Configuration ¶
- See property descriptions in ActiveDateList.php
Change Log ¶
April 6, 2010 ¶
- Initial release.
Input array not being converted to string
This seems like a great extension. It should do exactly what I need for my application.
However, I cannot get it to work, and I am not sure if I have mis-configured it or if it has a bug of some kind.
The lists are created OK when the "page" containing them is requested via GET, but when the form is POSTed, I get the following error:
preg_match() expects parameter 2 to be string, array given protected/extensions/ActiveDateList.php(126) if(!preg_match($formatPattern, $value, $date))
The following is my configuration for the widget in my view:
$this->widget('ActiveDateList', array( 'model' => $student, 'attribute' => 'beginStudies', 'keySort' => true, 'startDate' => '2010-08-01', 'endDate' => '2020-12-31', ));
And here is where I've attached the event handler in my controller:
$student = new User; $student->setScenario('registerStudent'); ActiveDateList::sanitize($student, 'beginStudies');
I have used the default displayFormat configuration for the purpose of troubleshooting this issue.
Same issue here...
Seems a great extension as waveslider said but I have the same issue
preg_match() expects parameter 2 to be string, array given
Troubleshooted just few minutes without solving..
@ciss
Hello,
I'm trying to use your widget to input users birthdate but it isn't possible to display older dates then timestemp = 0 (01-01-1970). am I missing somthing or is this an issue?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.