Reputation: 4773
i am using jquery datepicker through YII framework and using an image .
this image have title
and alt
and i could not remove them
here's my code in YII to display the image
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name' => 'sso_register[dob]',
//'model' => $model,
'attribute' => 'dob',
'value' => $dbText,
'options' => array(
'changeMonth' => true,
'changeYear' => true,
'dateFormat' => 'dd/mm/yy',
'yearRange' => "-100:+0",
'maxDate' => '31/12/2007', //day can choose >= tomorrow
'buttonImage' => Yii::app()->baseUrl . '/images/date_picker.png',
'buttonImageOnly' => true,
'showButtonPanel' => false,
'showOn' => 'button',
'altField' => '',
),
'htmlOptions' => array(
'class' => 'inputfield-middleside-date',
'readonly' => 'true',
'style' => 'position: relative; z-index: 100;',
'tabindex' => '7',
'alt'=>'',
'title'=>'',
)
));
any way to remove those 3 dots in image alt attribute on all browsers ? Thank you
Upvotes: 7
Views: 5322
Reputation: 2046
If you use traditional function,
you can use
buttonText : '',
Full example with cursor pointer, redirect with day, month and year:
<script>
$("#calendario").datepicker({
buttonImage: '/images/calendario2.png',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
showOn: 'both',
buttonText : '',
onSelect: function(date, instance) {
var date = $(this).datepicker('getDate'),
dia = date.getDate(),
mes = date.getMonth() + 1,
agno = date.getFullYear();
window.location = "caja.php?dia="+dia + '&mes=' + mes + '&agno=' + agno; }
});
$( ".ui-datepicker-trigger" ).css('cursor','pointer');
</script>
Upvotes: 0
Reputation: 4773
adding 'buttonText'=>'',
will solve the problem
http://api.jqueryui.com/datepicker/#option-buttonText
Upvotes: 12