function __construct($attributes = nil) { parent::__construct($attributes); // ensure that a default range is set if (is_null($this->range)) { $this->set_range(array("1970-01-01", date('Y-m-d'))); } if (is_null($this->default)) { $this->set_default(array("1970-01-01", date('Y-m-d'))); } }