onclick隐藏日历同时赋值文本框就行了
假如这个是你的文本框 function date(){ //你获得的时间 var d = “2010-01-18”; document.getElementById("date").value=d;} 在你的日历js里面 onclick的时候调用该方法;这样就OK了
直接使用插件的回调函数即可;
$('#timepicker').datetimepicker({
showHour: true,
showMinute: true,
dateFormat: "yy-mm-dd",
timeFormat: 'HH:MM',
onSelect:function(dateText, inst) {
//alert(dateText);//OK
window.location.href = "getData.do?date="+dateText;
}
});