# datepicker
**Repository Path**: ikaros-521/datepicker
## Basic Information
- **Project Name**: datepicker
- **Description**: Support range selection, maximum and minimum settings, time format free conversion, UI good-looking, easy to use, refer to element-ui datePicker jQuery version
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-12-24
- **Last Updated**: 2022-05-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Datepicker.js
> Complete functions, to meet the simple configuration to complete complex needs. More types, more choices.

**Datepicker.js**:
- 支持时分秒年月日范围选择
- 最大最小值限制
- 限制开始结束时间间隔最大值
- 快捷选项简易配置
- 支持只选年月,只选年
ui仿vue element-ui datapicker组件,实现jquery版本。一直没找到满意的开源jquery时间插件,所以自己写一个用在项目上,并开源出来,希望对你有帮助
[Demo](https://qiuyaofan.github.io/datepicker/)
## Browser Install
```
// picker css(加载了fonts,具体看scss文件夹)
// rely on plugins
// picker js
```
## Usage
In HTML, add an identifier to the element:
```html
```
All you need to do now is just instantiate datepicker as follows:
```js
// 年月日单个(J-datepicker-day对应html里的input父元素div)
$('.J-datepicker-day').datePicker({
hasShortcut: true,
format:'YYYY-MM-DD',
shortcutOptions: [{
name: '今天',
day: '0'
}, {
name: '昨天',
day: '-1'
}, {
name: '一周前',
day: '-7'
}]
});
```
or datepicker with range reference:
```html
-
```
```js
//年月日范围
$('.J-datepicker-range-day').datePicker({
hasShortcut: true,
format: 'YYYY-MM-DD',
isRange: true,
shortcutOptions: [{
name: '最近一周',
day: '-7,0'
}, {
name: '最近一个月',
day: '-30,0'
}, {
name: '最近三个月',
day: '-90, 0'
}]
});
```
or with range ,min and max,format is 'YYYY-MM-DD HH:mm:ss'
```html