以下是我的代码,
$(".datepicker'.$k.'").datepicker({
changeMonth: false,
showOn: "button",
buttonImage: "themes/assets_en/image/calanderimages.png",
buttonImageOnly: true,
buttonText: "Click it..",
changeYear: false,
changeDate: true,
startDate: "'.date('m/d/Y',strtotime($default_startdate)).'",
endDate: "'.$end_dt.'",
//dateFormat: "mm/dd/yy",
maxDate: "'.$end_dt.'",
//maxDate: +4,
minDate: "'.$start_dt.'",
'.$beforeShowDay.'
onSelect: function(date) {
$(".datepicker'.$k.'").val($("#datepicker-re'.$k.'").val());
}
})
现在我想要的是,当我们鼠标悬停时,日历按钮图像应该显示日期选择器。 目前,当我点击日历datepicker的按钮图像时,正在显示。我不想要这个。 PLZ伙计们帮助我。 提前谢谢......
答案 0 :(得分:0)
我得到了答案。
$("#datepicker1_'.$k.'").datepicker({
changeMonth: false,
// showOn: "button",
// buttonImage: "themes/assets_en/image/calanderimages.png",
// buttonImageOnly: true,
// buttonText: "Click it..",
changeYear: false,
changeDate: true,
startDate: "'.date('m/d/Y',strtotime($default_startdate)).'",
endDate: "'.$end_dt.'",
//dateFormat: "mm/dd/yy",
maxDate: "'.$end_dt.'",
//maxDate: +4,
minDate: "'.$start_dt.'",
'.$beforeShowDay.'
onSelect: function(date) {
$(".datepicker'.$k.'").val($("#datepicker-re'.$k.'").val());
}
})
.hide()
$("#datepickerImage<?php echo $k;?>").hover(function() {
$("#datepicker1_<?php echo $k;?>").toggle();
// /$("#datepicker").show();
});
<img src="themes/assets_en/image/calanderimages.png" id="datepickerImage<?php echo $k;?>" class="calendar_img">
<div id="datepicker1_<?php echo $k;?>"></div>