.
开始日期:<input type="text" id="txtStartTime" class="easyui-datebox" style="width:90px"/>
设置初始值:
$(function () {
$("#txtStartTime").datebox({ formatter: formatDate });
//设置
$("#txtStartTime").datebox("setValue", getCurrentDate());
});
function formatDate(date) {
return date.getFullYear() + "-" + (date.getMonth() +1) + "-" + date.getDate();
}
获取值:
var btime = $("#txtStartTime").datebox("getValue");
转载于:https://my.oschina.net/mleo/blog/104388