jQuery EasyUI/TopJUI创建日期时间输入框
jQuery EasyUI/TopJUI创建日期时间输入框
日期时间输入框组件

HTML
和日期输入框类似,日期时间输入框允许用户选择日期和指定的时间并按照指定的输出格式显示。相比日期输入框,它在下拉面板中添加了一个时间微调器。
<div class="topjui-container">
<fieldset>
<legend>默认日期时间输入框</legend>
</fieldset>
<div class="topjui-row">
<div class="topjui-col-sm6">
<label class="topjui-form-label">开始时间</label>
<div class="topjui-input-block">
<input name="birthday"
data-toggle="topjui-datetimebox"
data-options="required:true,
width:450,
showSeconds:false"> //是否显示秒钟信息
</div>
</div>
<div class="topjui-col-sm6">
<label class="topjui-form-label">结束时间</label>
<div class="topjui-input-block">
<input name="birthday"
data-toggle="topjui-datetimebox"
data-options="required:true,
width:450,
showSeconds:true">
</div>
</div>
</div>
</div>
js
<input id="dt" type="text" name="birthday">
$('#dt').iDatetimebox({
value: '3/4/2010 2:3',
required: true,
showSeconds: false
});
设置日期时间输入框
$('#dt').iDatetimebox('setValue', '6/1/2012 12:30:56'); // 设置日期时间输入框的值
var v = $('#dt').iDatetimebox('getValue'); // 获取日期时间输入框的值
alert(v);
EasyUI中文网:http://www.jeasyui.cn
TopJUI前端框架:http://www.topjui.com
TopJUI交流社区:http://ask.topjui.com
作者:小策一喋
邮箱:xvpindex#qq.com
出处:http://www.cnblogs.com/xvpindex/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。如果觉得本文对您有益,欢迎点赞、欢迎探讨。本博客来源于互联网的资源,若侵犯到您的权利,请联系博主予以删除。

浙公网安备 33010602011771号