xuelishuyue

1.前端input (data-options="editable:true"  这个不要也可以,如果有需要设置为true )

<input id="xxx" name="xxx" class="easyui-datebox" data-options="editable:true" />

 2.js代码,此处showSeconds: false则不显示秒,showSeconds: true 则显示秒

//时间时分秒
    $(\'#xxx\').datetimebox({
        value: \'3/4/2010 0:0\',
        required: true,
        showSeconds: false
    });

3.取值,设值

//设值
$(\'#xxx\').datebox({\'setValue\', \'2021-10-25 14:23\'});
$(\'#xxx\').datebox({\'setValue\', \'2021-10-25 14:23:00\'});

//取值
$(\'#xxx\').datebox("getValue");

 

分类:

技术点:

相关文章: