Yii 1.1: activedatelist

Splits a date string into dropdown lists.

ActiveDateList creates dropdown lists from a date string. For configuration examples, please see the examples for the $displayFormat property.




  • Yii 1.1.1 or above


  • Extract the release file under protected/extensions


  • See property descriptions in ActiveDateList.php

Change Log

April 6, 2010

  • Initial release.

Total 3 comments

#3686 report it
klod at 2011/04/28 04:56am


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?

#2874 report it
delmi at 2011/02/20 08:28am
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..

#323 report it
tommytwoeyes at 2010/07/09 10:49am
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


 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;
ActiveDateList::sanitize($student, 'beginStudies');

I have used the default displayFormat configuration for the purpose of troubleshooting this issue.

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: ciss
  • Category: Date and Time
  • Votes: +3 / -1
  • Downloaded: 904 times
  • Created on: Apr 6, 2010
  • Last updated: Apr 6, 2010