Extending CJuiDatepicker

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



class MyJuiDatepicker extends CJuiDatepicker

{ // this is line 6

	public function init ()


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

		$base = YiiBase::getPathOfAlias(



		$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