提交 ea05974d 编写于 作者: A afc163

datepicker style update

上级 21cca753
# 禁用
- order: 5
选择框的不可用状态。
---
````jsx
var Datepicker = antd.Datepicker;
React.render(
<Datepicker value="2015-06-06" disabled={true} />
, document.getElementById('components-datepicker-demo-disabled'));
````
......@@ -2,7 +2,7 @@
- order: 3
设置 `disabled` 方法,来确定不可选时段。
设置 `disabledDate` 方法,来确定不可选时段。
如上例:不可选择今天之后的日期。
......@@ -16,6 +16,6 @@ var disabledDate = function(current, value) {
};
React.render(
<Datepicker disabled={disabledDate} />
<Datepicker disabledDate={disabledDate} />
, document.getElementById('components-datepicker-demo-range'));
````
......@@ -56,7 +56,7 @@ export default React.createClass({
render() {
var calendar = (
<Calendar
disabledDate={this.props.disabled}
disabledDate={this.props.disabledDate}
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>
);
}
......
......@@ -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" |
| disabledDate | 不可选择的日期 | function | 无 |
| onSelect | 选择日期的回调 | function | 无 |
| showTime | 显示时间选择条 | boolean | false |
| disabled | 禁用 | bool | false |
<style>
.code-box-demo .ant-calendar-picker-input {
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册