class=easyui-datebox
$(document).ready(function() {
$("#thedate").datebox("setValue",myformatter( new Date()));
$(".datebox :text").attr("readonly","readonly");
});
function myformatter(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return y+‘-‘+(m<10?(‘0‘+m):m)+‘-‘+(d<10?(‘0‘+d):d);
}
时间: 2024-10-13 10:05:05