6 Star 11 Fork 1

Capricair / datepicker

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

DatePicker

移动端滚动式日期控件,平滑滚动,超小体积,原生js编写,不依赖第三方文件。

快速开始

1、引入文件

<!-- 样式文件 -->
<link rel="stylesheet" href="path/to/datepicker.css" />

<!-- 脚本文件 -->
<script src="path/to/datepicker.js"></script>

2、在input上加上role="datepicker",就这么简单

<input type="text" role="datepicker" readonly />

更多功能

1、日期格式默认为 yyyy-MM-dd,如果你想自定义格式,添加 data-format

<input type="text" role="datepicker" data-format="yyyy/MM/dd" readonly />

2、如果你只想选年月

<input type="text" role="datepicker" data-format="yyyy-MM" readonly />

3、想要初始值,简单

<input type="text" role="datepicker" value="2016-10-10" readonly />

预览地址

注:使用github自带预览地址,加载速度比较慢,点击输入框没反应的童鞋请耐心等待或刷新重试

Datepicker Demo

Comments ( 0 )

Sign in for post a comment

About

移动端滚动式日期控件,平滑滚动,超小体积,原生js编写,不依赖第三方文件。 spread retract
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://git.oschina.net/capricair/datepicker.git
git@git.oschina.net:capricair/datepicker.git
capricair
datepicker
datepicker
master

Search