Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不能支持设置只有小时和分钟呀?不要显示秒 #68

Open
wants to merge 26 commits into
base: v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.svn/
*.swp
.nojekyll
.project
.settings/
node_modules/
_site/
release/
.npmignore
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# [更新日志](http://www.layui.com/laydate/changelog.html)

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 layui

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.
25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
## 说明
1. laydate.js是压缩后的核心代码,laydate.dev.js是开发版的源代码。
1. need目录存放着核心css
1. skins是皮肤目录
1. 将laydate pull到你的本地后,将其存放到您js相关目录下的laydate目录,不要改动laydate的结构,否则无法正常运行。

## 简要
她基于原生JavaScript精心雕琢,兼容了包括IE6在内的所有主流浏览器。她具备优雅的内部代码,良好的性能体验,和完善的皮肤体系,并且完全开源,你可以任意获取开发版源代码,一扫某些传统日期控件的封闭与狭隘。layDate本着资源共享的开发者精神和对网页日历交互无穷的追求,延续了layui一贯的简单与易用。她遵循LGPL协议,您可以免费将她用于任何个人项目
## 概要
一款被广泛使用的高级 Web 日历组件,颜值与功能兼备,足以应对日期相关的各种业务场景。其中主要以:年选择器、年月选择器、日期选择器、时间选择器、日期时间选择五种类型的选择方式为基本核心,并且均支持范围选择(即双控件)。内置强劲的自定义日期格式解析和合法校正机制,含中文版和国际版,主题简约却又不失灵活多样。内部采用是零依赖的原生 JavaScript 编写,可作为独立组件使用

## 更新日志
## 官网
[http://www.layui.com/laydate/](http://www.layui.com/laydate/)

1.1

1. layer.now(timestamp,format)支持多类型参数。timestamp支持今天的前若干天,和今天的后若干天,并且如果是一个有效的时间戳,则返回该时间戳对应的日期。如果什么都没传入,则返回当前时间日期。format为日期格式,为空时则采用默认的“-”分割。
2. 优化核心代码。
3. 分和秒的选择改成10列*6行。
4. 修复星期未居中对齐的样式问题
5. 修复在页面加载完毕事件中,调用laydate所造成的立即执行的bug
6. 皮肤包新增[墨绿]。

## 备注
[官网](http://laydate.layui.com/)、[社区](http://fly.layui.com/)
## 相关
[文档](http://www.layui.com/doc/modules/laydate.html)
3 changes: 3 additions & 0 deletions dist/laydate.js

Large diffs are not rendered by default.

Binary file added dist/theme/default/font/iconfont.eot
Binary file not shown.
45 changes: 45 additions & 0 deletions dist/theme/default/font/iconfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/theme/default/font/iconfont.ttf
Binary file not shown.
Binary file added dist/theme/default/font/iconfont.woff
Binary file not shown.
1 change: 1 addition & 0 deletions dist/theme/default/laydate.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

/*!
* laydate build
*/

var pkg = require('./package.json');

var gulp = require('gulp');
var uglify = require('gulp-uglify');
var minify = require('gulp-minify-css');
var rename = require('gulp-rename');
var header = require('gulp-header');
var del = require('del');

//发行版本目录
var releaseDir = './release/zip/layDate-v' + pkg.version;
var release = releaseDir + '/laydate';

var task = {
laydate: function() {
gulp.src('./src/**/*.css')
.pipe(minify({
compatibility: 'ie7'
}))
.pipe(gulp.dest('./dist'));

return gulp.src('./src/laydate.js').pipe(uglify({
output: {
ascii_only: true //escape Unicode characters in strings and regexps
}
}))
.pipe(header('/*! <%= pkg.realname %> v<%= pkg.version %> | <%= pkg.description %> | <%= pkg.license %> Licensed */\n ;', {pkg: pkg}))
.pipe(gulp.dest('./dist'));

}
,other: function(){
gulp.src('./src/**/font/*').pipe(rename({}))
.pipe(gulp.dest('./dist'));
}
};


gulp.task('clear', function(cb){ //清理
return del(['./dist/*'], cb);
});
gulp.task('laydate', task.minjs); //压缩PC版本
gulp.task('other', task.other); //移动一些配件

//打包发行版
gulp.task('clearZip', function(cb){ //清理
return del(['./release/zip/layDate-v'+ pkg.version], cb);
});
gulp.task('r', ['clearZip'], function(){
gulp.src('./release/doc/**/*')
.pipe(gulp.dest(releaseDir))

return gulp.src('./dist/**/*')
.pipe(gulp.dest(releaseDir + '/laydate'))
});

//全部
gulp.task('default', ['clear'], function(){
for(var key in task){
task[key]();
}
});






Loading