Extending CJuiDatepicker

In order to customize datepickers all over my app, I defined my own widget as follows:


<?php


Yii::import('zii.widgets.jui.CJuiDatePicker');


class MyJuiDatepicker extends CJuiDatepicker

{ // this is line 6

	public function init ()

	{

		$am = Yii::app()->assetManager;

		$base = YiiBase::getPathOfAlias(

			'application.extensions.jquery-ui-custom'

		);

		$this->scriptUrl = rtrim($am->publish($base . '/js'), '/');

		$this->themeUrl = rtrim($am->publish($base . '/css'), '/');

		$this->theme = 'custom-theme';

		$this->scriptFile = 'jquery-ui-1.8.16.custom.min.js';

		$this->cssFile = 'jquery-ui-1.8.16.custom.css';

	}

}



It produces the error: "include(CJuiDatepicker.php): failed to open stream: No such file or directory". The error traces back to line 6 of my file, which is the line with the open brace after the class declaration. Yii::import() on line 3 executes fine.

What am I doing wrong?

Change to this class declaration




class MyJuiDatepicker extends CJuiDatePicker



/Tommy