update datepicker style

This commit is contained in:
afc163 2015-06-11 18:08:00 +08:00
parent 81d61868b2
commit a73aff66f8
9 changed files with 75 additions and 43 deletions

View File

@ -44,6 +44,7 @@ module.exports = React.createClass({
defaultValue={defaultCalendarValue} defaultValue={defaultCalendarValue}
showTime={this.props.showTime} showTime={this.props.showTime}
prefixCls="ant-calendar" prefixCls="ant-calendar"
showOk={this.props.showTime}
showClear={false} /> showClear={false} />
); );
return ( return (

View File

@ -14,7 +14,7 @@
"dependencies": { "dependencies": {
"gregorian-calendar": "~3.0.0", "gregorian-calendar": "~3.0.0",
"gregorian-calendar-format": "~3.0.1", "gregorian-calendar-format": "~3.0.1",
"rc-calendar": "~3.8.0", "rc-calendar": "~3.9.0",
"rc-dialog": "~4.3.0", "rc-dialog": "~4.3.0",
"rc-dropdown": "~1.0.0", "rc-dropdown": "~1.0.0",
"rc-menu": "~3.3.0", "rc-menu": "~3.3.0",

View File

@ -87,13 +87,13 @@ li {
} }
a { a {
color: #6EB4E0; color: #00ABEA;
text-decoration: none; text-decoration: none;
transition: color .3s ease; transition: color .3s ease;
} }
a:hover { a:hover {
color: #6EB4E0; color: #23C0FA;
} }
.clearfix:after { .clearfix:after {

View File

@ -11,6 +11,7 @@
box-shadow: 0 0 4px #d9d9d9; box-shadow: 0 0 4px #d9d9d9;
background-clip: padding-box; background-clip: padding-box;
line-height: @line-height-base; line-height: @line-height-base;
display: block !important;
&-week-number { &-week-number {
width: 286px; width: 286px;
@ -23,38 +24,31 @@
&-header { &-header {
padding: 0 10px; padding: 0 10px;
height: 34px; height: 34px;
line-height: 24px;
text-align: center; text-align: center;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border-bottom: 1px solid #e9e9e9; border-bottom: 1px solid #e9e9e9;
> a { a {
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
padding: 4px 5px;
text-align: center;
width: 30px;
color: #666; color: #666;
line-height: 34px;
&:hover { &:hover {
cursor: pointer;
color: #23c0fa; color: #23c0fa;
} }
} }
.@{prefixCalendarClass}-prev-month-btn { .@{prefixCalendarClass}-year-select,
position: absolute;
left: 25px;
}
.@{prefixCalendarClass}-next-month-btn {
position: absolute;
right: 25px;
}
.@{prefixCalendarClass}-month-select { .@{prefixCalendarClass}-month-select {
width: 140px; padding: 0px 2px;
}
> a {
color: #999;
font-family: Arial,"Hiragino Sans GB","Microsoft Yahei","Microsoft Sans Serif","WenQuanYi Micro Hei",sans-serif;
padding: 0 5px;
font-size: 16px;
} }
.@{prefixCalendarClass}-month-select-arrow { .@{prefixCalendarClass}-month-select-arrow {
@ -70,12 +64,20 @@
top: 0; top: 0;
} }
&-next-year-btn { &-prev-year-btn {
right: 0; left: 7px;
} }
&-prev-year-btn { &-next-year-btn {
left: 0; right: 7px;
}
&-prev-month-btn {
left: 29px;
}
&-next-month-btn {
right: 29px;
} }
&-calendar-body { &-calendar-body {
@ -177,20 +179,39 @@
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
border-top: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9;
}
&-footer-btn {
text-align: center; text-align: center;
display: block;
} }
&-footer > div { &-footer > div {
display: inline-block; display: inline-block;
} }
.@{prefixCalendarClass}-today-btn, .@{prefixCalendarClass}-clear-btn { .@{prefixCalendarClass}-today-btn,
.@{prefixCalendarClass}-clear-btn {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
margin-left: 8px;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
color: #23c0fa; color: #23c0fa;
} }
} }
.@{prefixCalendarClass}-ok-btn {
.btn;
.btn-primary;
.button-size(@btn-padding-sm; @font-size-base; @btn-border-radius-sm);
letter-spacing: 3px;
text-indent: 3px;
padding-left: 8px;
padding-right: 8px;
position: absolute;
bottom: 9px;
right: 9px;
}
} }

View File

@ -21,7 +21,7 @@
text-align: center; text-align: center;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #e9e9e9;
> a { > a {
font-weight: bold; font-weight: bold;

View File

@ -21,12 +21,12 @@
text-align: center; text-align: center;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #e9e9e9;
> a { > a {
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
padding: 4px 5px; padding: 0 5px;
text-align: center; text-align: center;
width: 30px; width: 30px;

View File

@ -1,7 +1,19 @@
@import "../../mixins/input"; @import "../../mixins/input";
.@{prefixCalendarClass}-time-input { .@{prefixCalendarClass}-time {
height: 25px; > span {
width: 40px; margin: 0 2px;
.ant-input; }
~ .@{prefixCalendarClass}-footer-btn {
display: inline;
text-align: left;
}
}
.@{prefixCalendarClass}-time-input {
.ant-input;
width: 30px;
height: 26px;
padding: 0;
text-align: center;
} }

View File

@ -17,7 +17,7 @@
text-align: center; text-align: center;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #e9e9e9;
} }
.@{prefixCalendarClass}-time-panel-body { .@{prefixCalendarClass}-time-panel-body {
@ -35,7 +35,6 @@
border-radius: 4px; border-radius: 4px;
} }
.@{prefixCalendarClass}-time-panel-table { .@{prefixCalendarClass}-time-panel-table {
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -44,15 +43,14 @@
.@{prefixCalendarClass}-time-panel-cell { .@{prefixCalendarClass}-time-panel-cell {
text-align: center; text-align: center;
height: 42px; height: 40px;
vertical-align: middle; vertical-align: middle;
} }
.@{prefixCalendarClass}-time-panel-time { .@{prefixCalendarClass}-time-panel-time {
line-height: 26px; line-height: 24px;
display: block; display: block;
border-radius: 4px; border-radius: 4px;
width:26px;
margin: 0 auto; margin: 0 auto;
&:hover { &:hover {

View File

@ -21,12 +21,12 @@
text-align: center; text-align: center;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #e9e9e9;
> a { > a {
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
padding: 4px 5px; padding: 0 5px;
text-align: center; text-align: center;
width: 30px; width: 30px;