GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - xfhxbb/LCalendar: LCalendar移动端日期时间选择控件

BranchesTags
Open more actions menu

Latest commit

 

History

102 Commits
102 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
dev
dev
 
 
gulp-task
gulp-task
 
 
public
public
 
 
src
src
 
 
.babelrc
.babelrc
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
favicon.ico
favicon.ico
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

LCalendar2.1.1 移动端日期时间选择控件

在线预览:https://xfhxbb.github.io/LCalendar/public/html/index.html 纯原生js的移动端日期插件,不依赖任何库,体积非常小只有10k ##用法 在html页面中引入input标签,通过自定义属性data-lcalendar控制最小日期和最大日期,写法如下:

...
<input type="text" readonly="" name="input_date" placeholder="请输入日期" data-lcalendar="2000-01-01,2018-01-29" />
...

将样式文件引入到页面中:

...
<link rel="stylesheet" href="LCalendar.css">
...

同时引入js文件到页面中:

...
<script src="LCalendar.js"></script>
...

初始化插件:

...
var calendar = new LCalendar();
calendar.init({
    'trigger': '#demo1',//标签id
    'type': 'date',//date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择
    'minDate':'1900-1-1',//最小日期 注意:该值会覆盖标签内定义的日期范围
    'maxDate':'2016-3-18'//最大日期 注意:该值会覆盖标签内定义的日期范围
});
...

调用起来非常简单,代码我后续会持续优化,如果喜欢希望赏颗星哦。

About

LCalendar移动端日期时间选择控件

Resources

Readme
MIT license
Activity

Stars

606 stars

Watchers

22 watching

Forks

197 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.