# Date Range Picker for Twitter Bootstrap
![Improvely.com](http://i.imgur.com/LbAMf3D.png)
This date range picker component for Twitter Bootstrap creates a dropdown menu from which a user can
select a range of dates. I created it while building the UI for [Improvely](http://www.improvely.com),
which needed a way to select date ranges for reports.
If invoked with no options, it will present two calendars to choose a start
and end date from. Optionally, you can provide a list of date ranges the user can select from instead
of choosing dates from the calendars. If attached to a text input, the selected dates will be inserted
into the text box. Otherwise, you can provide a custom callback function to receive the selection.
**[View a demo](http://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/)**
## Usage
This component relies on [Twitter Bootstrap](http://twitter.github.com/bootstrap/),
[Moment.js](http://momentjs.com/) and [jQuery](http://jquery.com/).
Separate stylesheets are included for use with Bootstrap 2 or Bootstrap 3.
Basic usage:
```
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript" src="daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="bootstrap.css" />
<link rel="stylesheet" type="text/css" href="daterangepicker-bs3.css" />
<script type="text/javascript">
$(document).ready(function() {
$('input[name="daterange"]').daterangepicker();
});
</script>
```
The constructor also takes an optional options object and callback function. The function will be called whenever
the selected date range has been changed by the user, and is passed the start and end dates (moment date objects) as
parameters.
````
$('input[name="daterange"]').daterangepicker(
{
format: 'YYYY-MM-DD',
startDate: '2013-01-01',
endDate: '2013-12-31'
},
function(start, end) {
alert('A date range was chosen: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
}
);
````
## Options Reference
`startDate`: (Date object, moment object or string) The start of the initially selected date range
`endDate`: (Date object, moment object or string) The end of the initially selected date range
`minDate`: (Date object, moment object or string) The earliest date a user may select
`maxDate`: (Date object, moment object or string) The latest date a user may select
`dateLimit`: (object) The maximum span between the selected start and end dates. Can have any property you can add to a moment object (i.e. days, months)
`showDropdowns`: (boolean) Show year and month select boxes above calendars to jump to a specific month and year
`showWeekNumbers`: (boolean) Show week numbers at the start of each week on the calendars
`timePicker`: (boolean) Allow selection of dates with times, not just dates
`timePickerIncrement`: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30)
`timePicker12Hour`: (boolean) Use 12-hour instead of 24-hour times, adding an AM/PM select box
`ranges`: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range
`opens`: (string: 'left'/'right') Whether the picker appears aligned to the left or to the right of the HTML element it's attached to
`buttonClasses`: (array) CSS class names that will be added to all buttons in the picker
`applyClass`: (string) CSS class string that will be added to the apply button
`cancelClass`: (string) CSS class string that will be added to the cancel button
`format`: (string) Date/time format string used by moment when parsing or displaying the selected dates
`separator`: (string) Separator string to display between the start and end date when populating a text input the picker is attached to
`locale`: (object) Allows you to provide localized strings for buttons and labels, and the first day of week for the calendars
## License
This code is made available under the same license as Twitter Bootstrap. Moment.js is included in this repository
for convenience. It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
--
Copyright 2012-2013 Dan Grossman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
PHP+MYSQL 开发的手机端众筹网站系统源码
共7769个文件
html:1956个
gif:1013个
php:927个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 183 浏览量
2022-07-01
15:55:25
上传
评论
收藏 143.09MB ZIP 举报
温馨提示
PHP+MYSQL 开发的众筹网站系统,众筹即大众筹资或群众筹资,互联网众筹作为快速筹集资金渠道的一种,向网友募集项目资金的模式。众筹利用互联网传播的特性,让小企业、艺术家或个人对公众展示他们的创意,争取大家的关注和支持,进而获得所需要的资金援助。该程序实现了上面介绍的模式,目前众筹网站算是互联网项目经营成本比较低的了。
资源推荐
资源详情
资源评论
收起资源包目录
PHP+MYSQL 开发的手机端众筹网站系统源码 (7769个子文件)
.tmp_header.html.18666~ 5KB
.tmp_deal_biref.html.19409~ 3KB
.tmp_account_left.html.23062~ 439B
.tmp_investor_business_mapi.html.24173~ 3KB
.tmp_deal_list.html.25678~ 4KB
.tmp_index_cates.html.28808~ 3KB
.tmp_login_tip.html.34286~ 3KB
.tmp_deal_biref.html.36366~ 3KB
.tmp_inc_article_cate.html.36793~ 3KB
.tmp_login_tip.html.44579~ 3KB
.tmp_investor_biref.html.4464~ 8KB
.tmp_login_tip.html.48358~ 2KB
.tmp_header.html.5004~ 5KB
.tmp_account_left.html.53547~ 2KB
.tmp_index.html.60673~ 2KB
.tmp_footer.html.64218~ 3KB
.tmp_online_index.html.64928~ 6KB
.tmp_login_tip.html.68185~ 3KB
.tmp_index_cates.html.70263~ 3KB
.tmp_investor_biref.html.77806~ 9KB
.tmp_deal_investor_right.html.80781~ 16KB
.tmp_login_tip.html.84636~ 0B
.tmp_header.html.90831~ 5KB
.tmp_deal_right.html.92263~ 5KB
URI.as 75KB
Tweener.as 41KB
Equations.as 29KB
main.as 25KB
Round3D.as 22KB
Dome.as 20KB
JPGEncoder.as 19KB
RoundGlass.as 17KB
DateUtil.as 17KB
SpecialPropertiesDefault.as 16KB
PlasticFlat.as 15KB
JSON.as 15KB
JSONTokenizer.as 14KB
PieSliceContainer.as 14KB
JSON.as 14KB
Round.as 13KB
Plastic.as 12KB
XAxis.as 11KB
printf.as 11KB
ScreenCoords.as 11KB
CylinderOutline.as 11KB
Pie.as 10KB
TweenListObj.as 10KB
Base.as 10KB
MD5.as 9KB
JSONEncoder.as 9KB
XAxisLabels.as 9KB
SHA256.as 9KB
scat.as 9KB
YAxisBase.as 9KB
SHA224.as 9KB
DateUtils.as 9KB
Tooltip.as 9KB
SHA1.as 8KB
Line.as 8KB
Css.as 8KB
Cylinder.as 8KB
RFC2817Socket.as 7KB
PointDotBase.as 7KB
StringUtil.as 7KB
YAxisLabelsBase.as 7KB
PieSlice.as 7KB
JSONDecoder.as 7KB
Base.as 7KB
Tag.as 6KB
LineBase.as 6KB
ObjectCollection.as 6KB
ArrayUtil.as 6KB
ScatterLine.as 6KB
PNGEncoder.as 5KB
Parser.as 5KB
ECandle.as 5KB
XMLUtil.as 5KB
tr.as 5KB
BarBase.as 5KB
URIEncodingBitmap.as 5KB
Element.as 4KB
StackCollection.as 4KB
Factory.as 4KB
WSSEUsernameToken.as 4KB
Bar3D.as 4KB
bow.as 4KB
RadarSpokeLabels.as 4KB
URLLoaderBase.as 4KB
Menu.as 4KB
anchor.as 3KB
Glass.as 3KB
star.as 3KB
JSONToken.as 3KB
IURIResolver.as 3KB
RadarAxisLabels.as 3KB
RadarAxis.as 3KB
menuItem.as 3KB
JSONParseError.as 3KB
ScatterBase.as 3KB
Horizontal.as 3KB
共 7769 条
- 1
- 2
- 3
- 4
- 5
- 6
- 78
资源评论
办公模板库素材蛙
- 粉丝: 1552
- 资源: 2289
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- pta题库答案c语言之排序4统计工龄.zip
- pta题库答案c语言之树结构7堆中的路径.zip
- pta题库答案c语言之树结构3TreeTraversalsAgain.zip
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功