Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

java开发的不太明白html群没加进去 问个幼稚问题 #541

Open
wants to merge 239 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
c2ca277
rm about.md
lihongxun945 Jan 4, 2016
af8ec16
rm sass
lihongxun945 Jan 4, 2016
511aa2d
reinit jekyll
lihongxun945 Jan 4, 2016
c1ae9af
update url config
lihongxun945 Jan 4, 2016
acc7962
update config
lihongxun945 Jan 4, 2016
e4f2918
add sidebar and deivce
lihongxun945 Jan 4, 2016
cbe8f9d
fix device
lihongxun945 Jan 4, 2016
5333e56
update doc: add buttons, cell, form, msg
lihongxun945 Jan 6, 2016
07215cb
update doc
lihongxun945 Jan 6, 2016
1faae6b
update components layout
lihongxun945 Jan 6, 2016
3aa6de4
add dist
lihongxun945 Jan 7, 2016
4fdd1d9
add some js components: actions, toast, dialog, loading
lihongxun945 Jan 7, 2016
f054ac6
update doc
lihongxun945 Jan 7, 2016
94818bd
update js
lihongxun945 Jan 7, 2016
a8c1873
add qrcode
lihongxun945 Jan 11, 2016
c565933
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Jan 11, 2016
4f229d4
update qrcode btn
lihongxun945 Jan 11, 2016
c7b97de
update dialog doc
lihongxun945 Jan 11, 2016
d7e27c9
update
lihongxun945 Jan 11, 2016
8c3f9c4
update
lihongxun945 Jan 11, 2016
665ec57
rm close-modal
lihongxun945 Jan 11, 2016
5a6e7d7
update version
lihongxun945 Jan 11, 2016
fe87394
update dist
lihongxun945 Jan 11, 2016
43fd95d
add ga
lihongxun945 Jan 14, 2016
2f83c9f
update dist
lihongxun945 Jan 21, 2016
68de2e4
add doc for: file upload, grid
lihongxun945 Jan 21, 2016
984d414
add touchstart in demo
lihongxun945 Jan 21, 2016
6379e1e
update version v0.2.0
lihongxun945 Jan 21, 2016
d39aaaa
update dist
lihongxun945 Jan 21, 2016
cbd3fb3
update index
lihongxun945 Jan 21, 2016
054580f
update dist
lihongxun945 Jan 21, 2016
f41ec50
update dist
lihongxun945 Jan 21, 2016
ee10125
fix cell-checkbox code
lihongxun945 Jan 25, 2016
60ccac1
add ptr
lihongxun945 Jan 25, 2016
b183a8e
update jq weui
lihongxun945 Jan 25, 2016
095d2cf
update dist
lihongxun945 Jan 26, 2016
52f14e0
update ptr doc
lihongxun945 Jan 26, 2016
10a77c4
add extends
lihongxun945 Jan 26, 2016
d92f6a2
add infinite docs
lihongxun945 Jan 26, 2016
e8bbc78
update infinite doc
lihongxun945 Jan 26, 2016
b6dfc6e
update infinite doc
lihongxun945 Jan 26, 2016
a6900b7
update infinite
lihongxun945 Jan 26, 2016
2ddce5c
update dist
lihongxun945 Jan 27, 2016
ccda16a
update index
lihongxun945 Jan 27, 2016
6f88783
fix sidebar
lihongxun945 Jan 27, 2016
45288cb
update dist
lihongxun945 Jan 28, 2016
48c41df
Merge branch 'gh-pages' into gh-pages-dev
lihongxun945 Jan 28, 2016
a71605e
add col
lihongxun945 Jan 28, 2016
cb0ecdb
update doc demos style
lihongxun945 Jan 28, 2016
242f639
增加了 navbar tabbar searchbar panel 四个组件的文档
lihongxun945 Mar 2, 2016
8a6f5cc
更新 tabbar navbar 文档
lihongxun945 Mar 3, 2016
3a841e6
更新tabbar文档
lihongxun945 Mar 3, 2016
82be4f6
更新版本号 v0.4.0
lihongxun945 Mar 3, 2016
436d79e
更新了下拉刷新和滚动加载的文档
lihongxun945 Mar 4, 2016
493ca2f
删除测试代码
lihongxun945 Mar 4, 2016
b08db53
更新了 grid 文档
lihongxun945 Mar 4, 2016
dadb8e0
增加了滚动加载结合navbar的例子
lihongxun945 Mar 4, 2016
750169c
更新dist
lihongxun945 Mar 4, 2016
7b39030
更新dist
lihongxun945 Mar 4, 2016
1de9b40
update dist
lihongxun945 Mar 23, 2016
9e1ecf0
增加了新组件的文档
lihongxun945 Mar 23, 2016
ba05587
增加了示例
lihongxun945 Mar 23, 2016
da8e868
更新文档
lihongxun945 Mar 23, 2016
646b36a
update version
lihongxun945 Mar 23, 2016
787590f
add notification
lihongxun945 Mar 23, 2016
76a4859
update notification demo
lihongxun945 Mar 23, 2016
ffac6c4
update version
lihongxun945 Mar 23, 2016
85dc015
add city doc
lihongxun945 Mar 23, 2016
f5caeac
update picker doc
lihongxun945 Mar 23, 2016
26193c9
update author name
lihongxun945 Mar 24, 2016
3a40602
updat to v0.5.1
lihongxun945 Mar 24, 2016
6cb8086
fix size
lihongxun945 Mar 28, 2016
3552a74
update dist to 0.6.0
lihongxun945 Apr 8, 2016
95afc1b
update to v0.6.0
lihongxun945 Apr 8, 2016
00c74b3
update dist
lihongxun945 Apr 8, 2016
e9cff7a
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Apr 8, 2016
712fed4
update version
lihongxun945 Apr 8, 2016
1c2c9fc
update to v0.6.1
lihongxun945 Apr 20, 2016
4e7fb77
gitbutttons -> https
lihongxun945 Apr 22, 2016
163f3a2
v0.7.0
lihongxun945 May 6, 2016
525f544
update dist
lihongxun945 May 6, 2016
752139b
update dist
lihongxun945 May 9, 2016
60f4598
update photos
lihongxun945 May 9, 2016
828a470
update photos doc
lihongxun945 May 9, 2016
5d3730c
Merge branch 'gh-pages-dev' into gh-pages
lihongxun945 May 9, 2016
2273777
update dist
lihongxun945 May 9, 2016
b40ceb8
update description
lihongxun945 May 9, 2016
b7c9601
update photos docs
lihongxun945 May 11, 2016
e6a5d28
update dist
lihongxun945 May 30, 2016
370ba49
update to v0.7.1
lihongxun945 May 30, 2016
aef698f
Merge branch 'gh-pages-dev' into gh-pages
lihongxun945 May 30, 2016
76dd7ed
update popup demo
lihongxun945 Jun 7, 2016
0acb1b7
add icon
lihongxun945 Jun 13, 2016
7b856cd
update index
lihongxun945 Jun 13, 2016
86b7618
update contact
lihongxun945 Jun 13, 2016
c3bad6b
update contact
lihongxun945 Jun 13, 2016
97a6175
update logo
lihongxun945 Jun 13, 2016
360339c
rm disabled arg in calendar
lihongxun945 Jun 14, 2016
101df83
update
lihongxun945 Jun 15, 2016
b3dc195
update
lihongxun945 Jun 15, 2016
d9796e9
update
lihongxun945 Jun 17, 2016
c095b85
update dist
lihongxun945 Jun 20, 2016
77258e1
Merge branch 'gh-pages-dev' into gh-pages
lihongxun945 Jun 20, 2016
b76f152
update to 0.7.2
lihongxun945 Jun 20, 2016
79a26c7
Merge branch 'gh-pages' into gh-pages-dev
lihongxun945 Jun 20, 2016
492513d
update dist
lihongxun945 Jun 21, 2016
4f48bf6
update version
lihongxun945 Jun 21, 2016
866a9a8
update dist
lihongxun945 Jun 21, 2016
780572a
add donate
lihongxun945 Jun 21, 2016
2e97428
Merge branch 'gh-pages-dev' into gh-pages
lihongxun945 Jun 21, 2016
dfbd01a
build
lihongxun945 Jun 22, 2016
054398d
update donate, add a joke
lihongxun945 Jun 23, 2016
1522345
update donate
lihongxun945 Jun 25, 2016
d1a5586
add vui notice
lihongxun945 Jul 6, 2016
15770aa
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Jul 6, 2016
ca3a676
update to v0.8.0
lihongxun945 Jul 21, 2016
ea44166
update 0.8.0
lihongxun945 Jul 21, 2016
bdba30a
Merge branch 'gh-pages' into gh-pages-dev
lihongxun945 Jul 21, 2016
dd815df
update doc
lihongxun945 Jul 21, 2016
58adca6
update picker doc
lihongxun945 Jul 21, 2016
92100b5
add cases page
lihongxun945 Jul 21, 2016
ede01f8
update cases
lihongxun945 Jul 21, 2016
cc57c78
add donate page
lihongxun945 Jul 22, 2016
e60019e
update donate code
lihongxun945 Jul 22, 2016
5f86131
update donate
lihongxun945 Jul 22, 2016
656d272
update dist
lihongxun945 Jul 22, 2016
3232b20
add tezisuo
lihongxun945 Jul 22, 2016
84839dd
update donate
lihongxun945 Jul 22, 2016
1483250
update donate and cases
lihongxun945 Jul 25, 2016
36b9944
fix cases
lihongxun945 Jul 25, 2016
82c8c84
fix modal doc
lihongxun945 Jul 25, 2016
5d89f86
fix modal doc
lihongxun945 Jul 25, 2016
9b321f2
add download page
lihongxun945 Jul 26, 2016
ece3bbf
update download link
lihongxun945 Jul 26, 2016
215c318
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Jul 26, 2016
cde5d8b
update description meta
lihongxun945 Aug 2, 2016
589248a
Create CNAME
lihongxun945 Aug 3, 2016
9a008a5
Update CNAME
lihongxun945 Aug 3, 2016
a7cb6de
Delete CNAME
lihongxun945 Aug 3, 2016
7c0c5df
Create CNAME
lihongxun945 Aug 3, 2016
6022795
update domain
lihongxun945 Aug 3, 2016
83ee300
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Aug 3, 2016
58cfb56
update baseurl
lihongxun945 Aug 3, 2016
edd23c0
https
lihongxun945 Aug 3, 2016
13ccf84
update donate wall
lihongxun945 Aug 10, 2016
fd36a40
update donate
lihongxun945 Aug 10, 2016
b06d504
update index page
lihongxun945 Aug 10, 2016
4a950cc
update
lihongxun945 Aug 10, 2016
c52567f
update donate page
lihongxun945 Aug 12, 2016
2a98b39
update download page
lihongxun945 Aug 15, 2016
840502a
update donate wall
lihongxun945 Aug 15, 2016
4acf2f7
update donate wall
lihongxun945 Aug 15, 2016
7de27d0
update dist to 0.8.1
lihongxun945 Aug 18, 2016
d57001e
add fast click
lihongxun945 Aug 18, 2016
0c81467
update to v0.8.1
lihongxun945 Aug 18, 2016
7938ea7
update donate
lihongxun945 Aug 22, 2016
14c1811
update v0.8.2
lihongxun945 Aug 26, 2016
1a320de
update doc
lihongxun945 Aug 26, 2016
efd4926
update about page
lihongxun945 Aug 30, 2016
fd0ac9b
update
lihongxun945 Sep 12, 2016
205df9d
add new qq group
lihongxun945 Sep 19, 2016
61ae8ab
update qq group
lihongxun945 Sep 19, 2016
73402b2
add blog url in header
lihongxun945 Sep 19, 2016
4a62774
update qq group
lihongxun945 Sep 29, 2016
dfa7392
update qq group
lihongxun945 Nov 10, 2016
afd06d5
update v0.8.3
lihongxun945 Dec 26, 2016
ba25e2a
add falvweiwang
lihongxun945 Dec 26, 2016
eb1f7a2
update to v1.0.0
lihongxun945 Dec 28, 2016
391d68b
update download
lihongxun945 Dec 28, 2016
b1f34bd
update download
lihongxun945 Dec 28, 2016
9dc0bea
update version
lihongxun945 Dec 28, 2016
8725e75
add old version link
lihongxun945 Dec 28, 2016
5b06bef
add alert
lihongxun945 Dec 28, 2016
d0a3d34
update navbar tabbar demo
lihongxun945 Dec 29, 2016
88424f6
update to v1.0.0-rc.1
lihongxun945 Dec 29, 2016
9e5f149
update version
lihongxun945 Dec 29, 2016
c53251f
rm rubish in form doc
lihongxun945 Dec 29, 2016
bc37401
update to v1.0.0
lihongxun945 Jan 8, 2017
b42619b
new year theme
lihongxun945 Jan 8, 2017
54816b9
add youpai link
lihongxun945 Jan 16, 2017
27f2cbf
修复表单控件示例代码的错误
wang0618 Feb 12, 2017
09f91ab
add yq
Feb 14, 2017
e72e493
test build
Feb 14, 2017
bf10e5e
update css version
Feb 14, 2017
476b1e7
Merge pull request #360 from 1746199054/patch-1
lihongxun945 Feb 14, 2017
98020c8
update v1.0.1
lihongxun945 Feb 18, 2017
cc99155
update
lihongxun945 Feb 18, 2017
861f2d2
update css
lihongxun945 Feb 18, 2017
bea3a3a
fix tabbar doc bug
lihongxun945 Feb 18, 2017
eb040f9
update
Feb 21, 2017
5f62099
update yq
lihongxun945 Apr 15, 2017
c137ce5
Merge branch 'gh-pages' of github.com:lihongxun945/jquery-weui into g…
lihongxun945 Apr 15, 2017
34d56fc
update donate page
lihongxun945 Jul 23, 2017
a5c6bb7
add total donate
lihongxun945 Jul 23, 2017
cdc694d
fix total donate bug
lihongxun945 Jul 23, 2017
99a68ab
add vum link in header
lihongxun945 Jul 23, 2017
b6dcece
add ad
lihongxun945 Nov 3, 2017
7ef6565
add README
lihongxun945 Nov 3, 2017
20d32e9
update README
lihongxun945 Nov 3, 2017
a9f9caf
for rebuild
lihongxun945 Nov 3, 2017
c9f6298
update ad
lihongxun945 Nov 6, 2017
150aa0b
rm ad
lihongxun945 Nov 8, 2017
e08c9b7
add swipeout doc
lihongxun945 Nov 10, 2017
edd0f91
add duohui ad
lihongxun945 Nov 10, 2017
9997bec
add enterprise-support
lihongxun945 Nov 10, 2017
86a5327
update ad
lihongxun945 Nov 11, 2017
43f02c8
update v1.1.1
lihongxun945 Nov 11, 2017
7596ad4
update to v1.1.2
lihongxun945 Nov 20, 2017
ab019cc
add https in cdn link
lihongxun945 Nov 20, 2017
1afbee4
update datetimepicker doc
lihongxun945 Nov 20, 2017
5588165
add ga event
lihongxun945 Nov 20, 2017
e36f3ea
more large pop img
lihongxun945 Nov 21, 2017
11ee3a8
update yq
lihongxun945 Nov 21, 2017
6f318e4
add jqweui.cn
lihongxun945 Nov 22, 2017
6c31190
add lihongxun.com
lihongxun945 Nov 23, 2017
d982674
add discourse entry
lihongxun945 Nov 23, 2017
ae08d9c
update blog url
lihongxun945 Nov 24, 2017
efd5f7b
add codingpages icon
lihongxun945 Nov 24, 2017
e4027d9
update codingpages icon
lihongxun945 Nov 24, 2017
ec6857e
update home page
lihongxun945 Nov 25, 2017
020920c
update home page
lihongxun945 Nov 25, 2017
1093da5
update to v1.2.0
lihongxun945 Nov 25, 2017
003923e
add vum entry
lihongxun945 Nov 29, 2017
29c1860
add new case
lihongxun945 Dec 1, 2017
ce9a188
update icp message
lihongxun945 Dec 11, 2017
470823b
update
lihongxun945 Dec 11, 2017
4f9a1c0
update
lihongxun945 Dec 11, 2017
7b3c1ae
update index
Dec 14, 2017
fdba86d
Merge pull request #475 from sunoj/gh-pages
lihongxun945 Dec 14, 2017
3cfddcb
fix url
Dec 14, 2017
3aa656d
Merge pull request #476 from sunoj/gh-pages
lihongxun945 Dec 14, 2017
36b5538
update
lihongxun945 Dec 20, 2017
ac3fc4d
fix beian
lihongxun945 Dec 20, 2017
05d472f
rm rubish
lihongxun945 Dec 22, 2017
c28dba5
update index
Jan 10, 2018
df8b83c
Merge pull request #488 from sunoj/gh-pages
lihongxun945 Jan 16, 2018
c565ca2
update ad
lihongxun945 Apr 10, 2018
26213ff
add myblog link
lihongxun945 Jul 3, 2018
8afd6d3
add gobang link
lihongxun945 Jul 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
_site
.sass-cache
.jekyll-metadata
*.swp
*.swo
node_modules
dist/
.package/
.sass-cache/
.DS_Store
_site/*
*.orig
node_modules/*
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jqweui.com
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Website for jQuery WeUI
[jqweui.com](https://jqweui.com)
20 changes: 8 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
title: Your awesome title
email: your-email@domain.com
title: jQuery WEUI
email: lihongxun945@gmail.com
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
UI lib for build hybrid wechat web app.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://yourdomain.com" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: jekyll
url: "http://localhost:4000/" # the base hostname & protocol for your site
twitter_username: lihongxun
github_username: lihongxun945

# Build settings
markdown: kramdown

# server
source: docs
host: 0.0.0.0
port: 4000
host: 0.0.0.0
exclude: [node_modules]
100 changes: 100 additions & 0 deletions _includes/_components/actions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<article id="actions" class='component' data-url="../dist/demos/action-sheet.html">
<h2>ActionSheet</h2>
<p>ActionSheet用于显示包含一系列可交互的动作集合,包括说明、跳转等。由底部弹出,一般用于响应用户对页面的点击。</p>

<p>ActionSheet 只能通过 JavaScript 进行调用:</p>

{% highlight js %}
$.actions({
actions: [{
text: "编辑",
onClick: function() {
//do something
}
},{
text: "删除",
onClick: function() {
//do something
}
}]
});
{% endhighlight %}

<h3>参数说明</h3>

<p>通过 <code>$.actions(params)</code> 方法打开 ActionSheet。可用参数如下:</p>

<table class='table'>
<tr>
<th>参数名</th>
<th>说明</th>
</tr>
<tr>
<td>actions</td>
<td>菜单项,关于每一个菜单项的配置请参见下文</td>
</tr>
<tr>
<td>title</td>
<td>可以给弹层设置一个标题,如果不设置则不会显示标题</td>
</tr>
<tr>
<td>onClose</td>
<td>关闭弹层的回调函数</td>
</tr>
</table>

<p><code>actions</code> 参数是一个数组,数组中的每一项都是一个菜单。</p>
<p>对每一个菜单的可用配置如下:</p>

<table class='table'>
<tr>
<th>参数名</th>
<th>说明</th>
</tr>
<tr>
<td>text</td>
<td>菜单显示的文案</td>
</tr>
<tr>
<td>className</td>
<td>菜单上额外追加的class</td>
</tr>
<tr>
<td>onClick</td>
<td>点击之后的回调函数</td>
</tr>
</table>

<h3>颜色配置</h3>

<p>从 <code>V0.7.0</code> 开始, 可以通过 <code>className</code> 参数配置不同的颜色或者背景,可以参考右侧的demo用法如下:</p>

{% highlight js %}
$.actions({
actions: [
{
text: "发布",
className: "color-primary",
},
...
});
{% endhighlight %}

<p>所有可用配置如下:</p>

<table class="table">
<tr>
<td>color-primary</td>
<td>color-success</td>
<td>color-danger</td>
<td>color-warning</td>
</tr>
<tr>
<td>bg-primary</td>
<td>bg-success</td>
<td>bg-danger</td>
<td>bg-warning</td>
</tr>
</table>

</article>
21 changes: 21 additions & 0 deletions _includes/_components/buttons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<article id="buttons" class='component' data-url="../dist/demos/buttons.html">
<h2>按钮</h2>
<p>按钮可以使用 <code>a</code> 或者 <code>button</code> 标签。wap上要触发按钮的 <code>active</code>态,必须触发 <code>ontouchstart</code>事件,可以在 <code>body</code> 上加上 <code>ontouchstart=""</code> 全局触发。</p>

<p>按钮常见的操作场景:确定、取消、警示,分别对应class:<code>weui-btn_primary</code>、<code>weui-btn_default</code>、<code>weui-btn_warn</code>,每种场景都有自己的置灰态 <code>weui-btn_disabled</code>,除此外还有一种镂空按钮 <code>weui-btn_plain-xxx</code>,客户端webview里的按钮尺寸有两类,默认宽度100%,小型按钮宽度自适应,两边边框与文本间距0.75em:</p>

{% highlight html %}
<a href="javascript:;" class="weui-btn weui-btn_primary">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_primary">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_warn">确认</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_warn">确认</a>
<a href="javascript:;" class="weui-btn weui-btn_default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_plain-default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_plain-primary">按钮</a>
{% endhighlight %}

<h3>Loading状态</h3>

<p><code>.weui-btn_loading</code> 可以使按钮变为loading状态</p>
</article>
186 changes: 186 additions & 0 deletions _includes/_components/calendar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<article class="component" id="calendar" data-url='../dist/demos/calendar.html'>
<h2 class="component-title">日历</h2>
<p class="component-description">日历组件用来选择年月日,可以代替系统原生的日历组件,提供更统一的视觉和交互以及更好的兼容性。</p>
<p>日历组件需要初始化才能使用,最简单的方式是通过一下JS代码来初始化,绑定到一个input元素上:</p>

{% highlight js %}
$("#my-input").calendar();
{% endhighlight %}

<p>当你点击input元素后,会自动弹出一个JS生成的日历组件。当用户选择日期之后,input的值会被设置为用户选择的日期。</p>
<p>如果你不想写js,可以通过以下方式来自动初始化:</p>
{% highlight html%}
<input type="text" data-toggle='date' />
{% endhighlight %}

<h2>参数</h2>
<p>你可以在初始化的时候指定如下参数:</p>

<table class="table">
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>默认值</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>multiple</td>
<td>boolean</td>
<td>false</td>
<td>是否多选, <code>V0.8.1+</code></td>
</tr>
<tr>
<td>inputReadOnly</td>
<td>boolean</td>
<td>true</td>
<td>是否自动在 <code>input</code> 元素上加上 <code>readonly</code> 属性</td>
</tr>
<tr>
<td>closeByOutsideClick</td>
<td>boolean</td>
<td>true</td>
<td>点击日历外面关闭</td>
</tr>
<tr>
<td>toolbarTemplate</td>
<td>string</td>
<td>参见源码</td>
<td>Toolbar 的HTML结构</td>
</tr>
<tr>
<td>value</td>
<td>array</td>
<td></td>
<td>默认选择的日期,注意是个数组,比如 <code>["2016-12-12"]</code></td>
</tr>
<tr>
<td>formatValue</td>
<td>function (p, values)</td>
<td></td>
<td>格式化函数. <b>values</b> 是用户选择的日期</td>
</tr>
<tr>
<td>monthNames</td>
<td>array</td>
<td>['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']</td>
<td>月名称</td>
</tr>
<tr>
<td>monthNamesShort</td>
<td>array</td>
<td>['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']</td>
<td>月名称缩写</td>
</tr>
<tr>
<td>dayNames</td>
<td>array</td>
<td>['周日', '周一', '周二', '周三', '周四', '周五', '周六']</td>
<td>周名称</td>
</tr>
<tr>
<td>dayNamesShort</td>
<td>array</td>
<td>['周日', '周一', '周二', '周三', '周四', '周五', '周六']</td>
<td>周名称缩写</td>
</tr>
<tr>
<td>dateFormat</td>
<td>'yyyy-mm-dd'</td>
<td>日期格式</td>
</tr>
<tr>
<td>minDate</td>
<td>undefined</td>
<td>最小可选日期,比如 <code>2015-06-01</code></td>
</tr>
<tr>
<td>maxDate</td>
<td>undefined</td>
<td>最大可选日期,比如 <code>2015-08-01</code></td>
</tr>
<tr>
<td>onChange</td>
<td>function(p, values, displayValues){}</td>
<td>当用户选择日期时触发</td>
</tr>
<tr>
<td>closeOnSelect</td>
<td>boolean</td>
<td>true</td>
<td>用户选择一个时间后就自动关闭</td>
</tr>
</tr>
<tr>
<td>yearPicker</td>
<td>boolean</td>
<td>true</td>
<td>Enable year picker in toolbar</td>
</tr>
<tr>
<th colspan="4">回调函数</th>
</tr>
<tr>
<td>onChange</td>
<td>function (p, values, displayValues)</td>
<td></td>
<td>Callback function that will be executed when picker value changed. <b>values</b> and <b>displayValues</b> are arrays where each item represents value/display value of related column</td>
</tr>
<tr>
<td>onMonthAdd</td>
<td>function (p, monthContainer)</td>
<td></td>
<td>Callback function that will be executed when newly generated month HTML element will be added to calendar.</td>
</tr>
<tr>
<td>onDayClick</td>
<td>function (p, dayContainer, year, month, day)</td>
<td></td>
<td>Callback function that will be executed when user clicks/select any date</td>
</tr>
<tr>
<td>onOpen</td>
<td>function (p)</td>
<td></td>
<td>Callback function that will be executed when picker is opened</td>
</tr>
<tr>
<td>onClose</td>
<td>function (p)</td>
<td></td>
<td>Callback function that will be executed when picker is closed</td>
</tr>
</tbody>
</table>

<p>当用户选择完日期之后,会在 input 上触发 <code>change</code> 事件,你可以监听此事件。</p>

<p>如果你只同时选择日期和时间,请使用 <a href='#datetime-picker'>日期时间选择器</a></p>

<h3>方法</h3>

<p>通过 <code>$("xxx").calendar("methodname", args)</code> 可以调用method的方法,目前有如下方法可以调用:</p>

{% highlight js %}
$("#input").calendar("close"); //关闭弹窗
$("#input").calendar("open"); //打开弹窗
$("#input").calendar("setValue", ["2012-12-12"]); //设置日期
$("#input").calendar("destroy"); //销毁
{% endhighlight %}

<h3>内联日历</h3>

<p>在初始化 <code>Calendar</code> 的时候可以通过 <code>container</code> 参数来指定一个容器,如果把这个容器指定为页面上的一个元素,那么日历就会默认显示出来。</p>


{% highlight js %}
$("#inline-calendar").calendar({
container: "#inline-calendar",
input: "#date3"
});
{% endhighlight %}

<p>如果你在内联日历的时候,不希望有一个 <code>input</code> 会显示用户的输入值,那么只需要指定一个 <code>type="hidden"</code> 的input即可。但是千万注意不能不设置 input 参数。具体请参见右侧demo的写法</p>
</article>
Loading