easyUI鐨刣atetimebox鐨剆etValue楠氭搷浣滀笉鐢熸晥

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了easyUI鐨刣atetimebox鐨剆etValue楠氭搷浣滀笉鐢熸晥相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/day' title='day'>day   璁剧疆   鐩存帴   init   鑾峰彇   eth   show   濂界殑   res   

涓嶈鍐嶅偦鍌荤殑浣跨敤setValue浜嗭紝鍥犱负setValue鏍规湰涓嶇敓鏁堬紝绠€鐩磋杩欎釜API鏂囨。缁欏潙鍧忎簡

鏈夌殑鏃跺€欏湪鑾峰彇鎺ュ彛涔嬪悗璧嬪€糳atetimebox鐨勬椂鍊欎竴鐩磋祴鍊间笉涓婂幓锛岀湅鐫€鏂囨。绀轰緥鍐欑潃

$(鈥?/span>#dt鈥?/span>).datetimebox(鈥?/span>setValue鈥?/span>, 鈥?/span>6/1/2012 12:30:56鈥?/span>);

鐒惰€岃繖涓唬鐮佸苟娌℃湁浠€涔堝嵉鐢紝鐪嬬湅涓嬮潰鐨勪唬鐮佸惂锛岃繖涓槸绀轰緥涓婄殑涓€绉嶏紝杩欐椂鍊欏氨鏈夊皬浼欎即鍎夸細闂簡锛岃繖涓拰setValue鏈夊尯鍒悧锛?/p>

$(鈥?/span>#dt鈥?/span>).datetimebox({
    value: 鈥?/span>3/4/2010 2:3鈥?/span>,
    required: true,
    showSeconds: false
});

杩樺埆璇达紝鐪熸湁鍖哄埆锛屽氨鏄湪杩欎釜{}瀵硅薄涓寘鐫€鐨勬墠鏄祴鍊肩殑姝g‘濮垮娍锛屽叾瀹為噷闈㈢殑 required 鍜?nbsp;showSeconds 杩欎袱涓槸鍙互涓嶅啓鐨勶紝榛樿 required 涓篺alse锛屽鏋滈渶姹備腑鍖呭惈鏃跺垎绉掔殑璇濓紝showSeconds 杩欎釜鍙傛暟涔熷彲浠ヤ笉璁剧疆锛屽洜涓洪粯璁ゆ槸true銆?/p>

鎵€浠ュ皬浼欎即鍎夸滑璇锋眰瀹屽悗鍙帮紝鐩存帴浣跨敤濡備笅绾㈣壊浠g爜鍗冲彲璧嬪€硷紝娌℃湁灏佽鏃堕棿鏍煎紡鐨勪唬鐮侊紝濡傞渶鏂逛究杞崲鏃堕棿锛岃嚜琛岀櫨搴︺€?/p>

$.ajax({
    url:鈥?/span>...鈥?/span>,
    data:{id:id},
    dataType:鈥?/span>json鈥?/span>,
    type:鈥?/span>get鈥?/span>,
    async:false,
    success:function(data){
      let date = new Date(data.time);
      let year = date.getFullYear()
      let month = date.getMonth() + 1 < 10 ? 鈥?/span>0鈥?/span> + date.getMonth() + 1:date.getMonth() + 1
      let day = date.getDate()
      let hour = date.getHours()
let minit
= date.getMinutes() let second = date.getSeconds() let resultTime = year + 鈥?/span>-鈥?/span> + month + 鈥?/span>-鈥?/span> + day + 鈥?/span> 鈥?/span> + hour + 鈥?/span>:鈥?/span> + minit + 鈥?/span>:鈥?/span> + second //鎷兼帴濂界殑鏃堕棿瀛楃涓?/span> $(鈥?datetimebox鈥?/span>).datetimebox({value: resultTime}); }
});

鍡?..娌′粈涔堜簡锛屽氨杩欐牱...



以上是关于easyUI鐨刣atetimebox鐨剆etValue楠氭搷浣滀笉鐢熸晥的主要内容,如果未能解决你的问题,请参考以下文章

Vue 澶ч噺data鍙妑ules鐨刣ata閫夐」缁撴瀯缁勭粐

涓€瀵逛竴鍏宠仈鏌ヨ鏃朵娇鐢╮elation杩炶疮鎿嶄綔鏌ヨ鍚庯紝璋冪敤getLastSql()鏂规硶杈撳嚭鐨剆ql璇彞

鏂伴矞鍑虹倝锛岃繖鏄叏缃戣鐨勬渶璇︾粏鐨剆pringboot鏁村悎娑堟伅鏈嶅姟浜嗗惂锛屽缓璁敹钘忥紒

easyUI API

EasyUI学习总结——EasyUI布局

表单(上)EasyUI Form 表单EasyUI Validatebox 验证框EasyUI Combobox 组合框EasyUI Combo 组合EasyUI Combotree 组合树((代码片