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

Commit

Permalink
日历默认显示今天
Browse files Browse the repository at this point in the history
  • Loading branch information
lihongxun945 committed Mar 24, 2016
1 parent 16cdb28 commit a489d85
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# v0.5.0
# v0.5.1 - 2016/03/24

对应 `weui` 版本为 `0.4.0`

- `Action Sheet` 现在可以点击背景关闭了。
- 更新了 `Picker``Calendar` 样式,现在和官方样式更加统一了。
- `Calendar` 现在如果没有设置 `value`,则默认显示今天。

# v0.5.0 - 2016/03/23

对应 `weui` 版本为 `v0.4.0`

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-weui",
"version": "0.5.0",
"version": "0.5.1",
"description": "为微信 Web 服务量身设计",
"keywords": [
"weui",
Expand All @@ -13,7 +13,7 @@
"Zepto"
],
"scripts": {},
"author": "任行",
"author": "言川",
"repository": {
"type": "git",
"url": "https://github.com/lihongxun945/jquery-weui"
Expand Down
5 changes: 5 additions & 0 deletions src/js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,11 @@
} else {
p.container = $this;
}
//默认显示今天
if(!params.value) {
var today = new Date();
params.value = [today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate()];
}
new Calendar($.extend(p, params));
});
};
Expand Down

2 comments on commit a489d85

@liqingzhu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好, 不知道为什么这个日历的控件在手机的微信端显示不了日期,但是在pc的浏览器上面测试正常
手机 红米note 微信版本 6.3.15

@YangYongAn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我也是 测试手机qq 微信 那个citypicker都出问题
安卓的

Please sign in to comment.