html代码是,
<div class="cols-3">
<div class="input input--large label js-label">
<label for="" id="start_date_lable" class="active">Insurance Start Date</label>
<span class="icon-calendar" id='start_date_icon'></span>
<input type="text" name="motor_search[start_date]" id="motor_search_start_date" placeholder="Insurance Start Date">
</div>
</div>
删除了工具提示标题但它仅在该工具提示显示后首次打开时才有效。我使用了以下代码,但它没有用。
Jquery代码是,
$(".picker__weekday").attr('title','');
$(document).ready(function(){
var today = new Date();
var nyr = new Date();
var prevDate = nyr.setYear(nyr.getFullYear()-90);
var m = parseInt(prevDate);
var finDate = new Date();
finDate.setTime(m);
var dobPicker = $('#motor_search_year_make').pickadate({
today: false,
clear: false,
close: false,
selectMonths: true,
selectYears: 90,
min:finDate,
max:new Date(),
labelMonthNext: '',
labelMonthPrev: '',
labelMonthSelect: '',
labelYearSelect: '',
hiddenSuffix: '',
clear: true,
format: 'dd mmmm yyyy',
formatSubmit: 'yyyy-mm-dd',
weekdaysShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
disable: [
{ from: [0,0,0], to: finDate }
],
onClose: function(){
this.$node.prev('label').removeClass('active');
},
onOpen: function(){
$(".picker__weekday").attr('title','');
}
});
});
答案 0 :(得分:0)
你可以使用css:
.picker__weekday{
pointer-events: none;
}
或者只需使用此选项将全名设为空
weekdaysFull: [ '', '', '', '', '', '', '' ]