Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
ea05974d
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ea05974d
编写于
7月 08, 2015
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
datepicker style update
上级
21cca753
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
20 deletion
+30
-20
components/datepicker/demo/disabled.md
components/datepicker/demo/disabled.md
+15
-0
components/datepicker/demo/range.md
components/datepicker/demo/range.md
+2
-2
components/datepicker/index.jsx
components/datepicker/index.jsx
+2
-2
components/datepicker/index.md
components/datepicker/index.md
+8
-8
style/components/datepicker/Picker.less
style/components/datepicker/Picker.less
+3
-8
未找到文件。
components/datepicker/demo/disabled.md
0 → 100644
浏览文件 @
ea05974d
# 禁用
-
order: 5
选择框的不可用状态。
---
````
jsx
var
Datepicker
=
antd
.
Datepicker
;
React
.
render
(
<
Datepicker
value
=
"2015-06-06"
disabled
=
{
true
}
/>
,
document
.
getElementById
(
'
components-datepicker-demo-disabled
'
));
````
components/datepicker/demo/range.md
浏览文件 @
ea05974d
...
...
@@ -2,7 +2,7 @@
-
order: 3
设置
`disabled`
方法,来确定不可选时段。
设置
`disabled
Date
`
方法,来确定不可选时段。
如上例:不可选择今天之后的日期。
...
...
@@ -16,6 +16,6 @@ var disabledDate = function(current, value) {
};
React
.
render
(
<
Datepicker
disabled
=
{
disabledDate
}
/>
<
Datepicker
disabled
Date
=
{
disabledDate
}
/>
,
document
.
getElementById
(
'
components-datepicker-demo-range
'
));
````
components/datepicker/index.jsx
浏览文件 @
ea05974d
...
...
@@ -56,7 +56,7 @@ export default React.createClass({
render
()
{
var
calendar
=
(
<
Calendar
disabledDate
=
{
this
.
props
.
disabled
}
disabledDate
=
{
this
.
props
.
disabled
Date
}
locale
=
{
CalendarLocale
}
orient
=
{
[
'
top
'
,
'
left
'
]
}
defaultValue
=
{
defaultCalendarValue
}
...
...
@@ -75,7 +75,7 @@ export default React.createClass({
value
=
{
this
.
state
.
value
}
prefixCls
=
"ant-calendar-picker"
onChange
=
{
this
.
handleChange
}
>
<
input
placeholder
=
{
this
.
props
.
placeholder
}
className
=
"ant-calendar-picker-input"
/>
<
input
disabled
=
{
this
.
props
.
disabled
}
placeholder
=
{
this
.
props
.
placeholder
}
className
=
"ant-calendar-picker-input ant-input"
/>
</
Datepicker
>
);
}
...
...
components/datepicker/index.md
浏览文件 @
ea05974d
...
...
@@ -18,14 +18,14 @@
## API
| 参数 | 说明 | 类型 | 默认值 |
|----------|----------------|----------|--------------|
| value | 日期 | string | 无 |
| format | 展示的日期格式 | string | "yyyy-MM-dd" |
| disabled | 不可选择的日期 | function | 无 |
|
transitionName | 动画名称 | String.可取 'slide-up' | 无.
|
|
onSelect | 选择日期的回调 | function | 无
|
|
showTime | 显示时间选择条 | boolean
| false |
| 参数
| 说明 | 类型 | 默认值 |
|----------
----
|----------------|----------|--------------|
| value
| 日期 | string | 无 |
| format
| 展示的日期格式 | string | "yyyy-MM-dd" |
| disabled
Date
| 不可选择的日期 | function | 无 |
|
onSelect | 选择日期的回调 | function | 无
|
|
showTime | 显示时间选择条 | boolean | false
|
|
disabled | 禁用 | bool
| false |
<style>
.code-box-demo .ant-calendar-picker-input {
...
...
style/components/datepicker/Picker.less
浏览文件 @
ea05974d
...
...
@@ -11,9 +11,6 @@
position: relative;
display: inline-block;
&-input {
.input;
}
&-icon {
position: absolute;
-webkit-user-select: none;
...
...
@@ -38,10 +35,8 @@
display: block;
}
&-open &-input {
border-color: #23c0fa;
box-shadow: 0 0 3px #23c0fa;
}
.ant-form-item &-input {
height: 32px;
border-color: @input-focus-border-color;
outline: 0;
box-shadow: 0 0 3px tint(@input-focus-border-color, 20%);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录