[EXTENSION] jqrelcopy -- datepicker icon copied twice

Hello everyone,

I am trying to use JQRelcopy with datepicker but I am having a weird error. On all the copied pairs, there are 2 datepicker icons. Please see the attachment:

3037

jqrelcopy-bug.png

I don’t know if it helps but here is more information: on the 2nd row, the icon closer to the input field opens the calendar for that field. The icon on the outside opens the 1st input field’s calendar.

Does anyone have any idea how to fix this?

Thank you!

Found the solution by myself (as it’s become usual because Yii is so great!):

Basically, you have to tell JQRelcopy to exclude copying the button. So, I added the following to my code and it works perfectly!


Yii::import('ext.jqrelcopy.JQRelcopy');

$this->widget('ext.jqrelcopy.JQRelcopy',

        	array(

            	'id' => 'addLoginLink',

            	'removeText' => 'remove',

            	'options' => array(

                	'limit'=>5,

                	'excludeSelector'=>'.ui-datepicker-trigger', //<< THIS IS WHAT I ADDED

            	),

            	'jsAfterNewId' => JQRelcopy::afterNewIdDatePicker($datePickerConfig),

        	)

)