最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Small fonts on Bootstrap DateTime picker - Stack Overflow

programmeradmin0浏览0评论

I´m using the Bootstrap 3 DateTime picker from www.github/Eonasdan/bootstrap-datetimepicker

Everything is working fine, except that I need to use small fonts and less spacing between the calendar grid lines.

Does anyone has an idea on how to do it. This is the original code:

<div class="small">
    <div id="myPlaceholder"></div>
</div>

And on Javascript:

 $('#myPlaceholder').datetimepicker({
                language : 'en'
            });

It works well, but does not show small fonts.

I´m using the Bootstrap 3 DateTime picker from www.github./Eonasdan/bootstrap-datetimepicker

Everything is working fine, except that I need to use small fonts and less spacing between the calendar grid lines.

Does anyone has an idea on how to do it. This is the original code:

<div class="small">
    <div id="myPlaceholder"></div>
</div>

And on Javascript:

 $('#myPlaceholder').datetimepicker({
                language : 'en'
            });

It works well, but does not show small fonts.

Share Improve this question edited Mar 18, 2015 at 21:52 amphetamachine 30.7k12 gold badges68 silver badges74 bronze badges asked Jan 14, 2015 at 1:06 MendesMendes 18.6k38 gold badges166 silver badges282 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 5

You only need to add your own CSS to style the date picker.

This will make the columns narrower:

.bootstrap-datetimepicker-widget td.day {
    width: 200px;
}

This will make the rows shorter:

.bootstrap-datetimepicker-widget td.day {
    line-height: 10px;
}

This makes the font smaller for the day numbers:

.bootstrap-datetimepicker-widget td.day {
    font-size: 10px;
}

And bining them all:

.bootstrap-datetimepicker-widget td.day {
    width: 200px;
    line-height: 10px;
    font-size: 10px;
}

And as a bonus, this will make the font size of the day of week smaller:

th.dow {
    font-size: 12px;
}
发布评论

评论列表(0)

  1. 暂无评论