daterangepicker README

The project's README from github.com/dangrossman/daterangepicker. As one markdown file: README.md.

Date Range Picker

Improvely.com

This date range picker component creates a dropdown menu from which a user can select a range of dates. I created it while building the UI for Improvely, which needed a way to select date ranges for reports.

Features include limiting the selectable date range, localizable strings and date formats, a single date picker mode, a time picker, and predefined date ranges.

Documentation and Live Usage Examples

See It In a Live Application

License

The MIT License (MIT)

Copyright (c) 2012-2020 Dan Grossman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

daterangepicker (dangrossman/daterangepicker)

Searching Database…

这是什么?这是一个 JavaScript 组件,可以显示下拉日历界面,用于选择日期范围、单个日期或带时间的日期,并将其绑定到输入框上。
它是独立的小部件还是完整的 UI 框架?它是一个单独的 UI 小部件(jQuery 插件),可以附加到现有的输入元素上,而不是框架。
如何把它添加到项目中?引入 jQuery 和 Moment.js,然后加载插件的 JS 和 CSS 文件,并在输入元素上进行初始化。
它需要哪些库?它依赖 jQuery 处理 DOM 和事件,依赖 Moment.js 进行日期解析和格式化。
我可以限制可选择的日期吗?可以,它内置支持限制可选择的日期范围。
为什么要开发这个?作者在为一款名为 Improvely 的产品构建界面时开发了它,该产品需要一种方式让用户为报表选择日期范围。
它支持选择带时间的单个日期吗?支持,除了范围选择外,它还包括单日期选择模式和时间选择模式。
我可以使用像“最近 7 天”这样的预设范围吗?可以,预设日期范围是它的内置功能之一。
我可以本地化文本和日期格式吗?可以,它开箱即支持可本地化的字符串和日期格式。
Size
2.1 MB
Stars
11K
Age
14y
Commits · 90 Days