Jump to content
Larry Ullman's Book Forums

Problem In Using X-Editable Extension Of Yii


soopers
 Share

Recommended Posts

I am using this extension and it works good. but when I change the date then as it is updated in the database, but on the gridview field it is not displaying.
I am using beforeSave() and afterFind() methods of yii in my model. as bellow

protected function beforeSave() {
if (parent::beforeSave()) {
if ($this->isNewRecord) {
$this->dob= date('Y-m-d', strtotime($this->dob));
return true;
} else {
$this->dob= date('Y-m-d', strtotime($this->dob));

            return true;
        }
    } else
        return false;
}
protected function afterFind() {

if (strtotime($this->dob) != 0)
$this->dob= XHtml::formatDate($this->dob);
else
$this->dob= '';

    return TRUE;
}

So how can I solve my problem.
Also the datepicker range is from 2004-2024 is the issue that how to increase this range.

Link to comment
Share on other sites

 Share

×
×
  • Create New...