samdark, on 09 October 2011 - 06:44 PM, said:
What's the problem in the first place? Would you please provide some code to reproduce it?
The class, as far I can tell, does not provide a way to set the range min or max which makes the control "fill" to start from the beginning or end. This means the only option was to have a slider with only a handle and not a progressively filled bar. The documentation of the control allows for "range" to not only be set to true/false but also a string of 'min' or 'max' so that the bar can be provided with a fill bar anchored to the max or min. I could not find a way to accomplish this without modifying the provided helper class which I did and am sharing the modification with all of you.
Anyways, I did end up finding a problem with my previous submission. Here is an update to fix it:
starting at line111
if( (string)$this->options['range'] != 'min' && (string)$this->options['range'] != 'max' ) {
echo CHtml::activeHiddenField($this->model,$this->maxAttribute,$options);
$attrMax=$this->maxAttribute;
$this->options['values']=array($this->model->$attribute,$this->model->$attrMax);
} else {
$this->options['value']=$this->model->$attribute;
}