码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap-datetimepicker年月日

时间:2016-01-21 11:53:02      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:

<div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" style="width: 150px;">
<input class="form-control" size="16" type="text" value="" readonly>
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
form_date,form_datetime,form_time
if(mvalue=="日报表")
{
$(‘.form_date‘).datetimepicker(‘remove‘);
$(‘.form_date‘).datetimepicker({
language: ‘zh-CN‘,
autoclose:true,
startView: ‘month‘,
minView: ‘month‘,
pickerPosition: "bottom-left",
format: "yyyy-mm-dd",
});
$(‘.form_date‘).datetimepicker(‘update‘, new Date());
}else if(mvalue=="月报表")
{
$(‘.form_date‘).datetimepicker(‘remove‘);
$(‘.form_date‘).datetimepicker({
language: ‘zh-CN‘,
autoclose: true,
startView: ‘year‘,
minView: ‘year‘,
pickerPosition: "bottom-left",
format: "yyyy-mm",
});
$(‘.form_date‘).datetimepicker(‘update‘, new Date());
}else if(mvalue=="年报表"){
$(‘.form_date‘).datetimepicker(‘remove‘);
$(‘.form_date‘).datetimepicker({
language: ‘zh-CN‘,
autoclose: true,
startView: ‘decade‘,
minView: ‘decade‘,
pickerPosition: "bottom-left",
format: "yyyy",
});
$(‘.form_date‘).datetimepicker(‘update‘, new Date());
}

Bootstrap-datetimepicker年月日

标签:

原文地址:http://www.cnblogs.com/jiujiduilie/p/5147728.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!