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}
showTime={this.props.showTime}
prefixCls="ant-calendar"
showOk={this.props.showTime}
showClear={false} />
);
return (

View File

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

View File

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

View File

@ -11,6 +11,7 @@
box-shadow: 0 0 4px #d9d9d9;
background-clip: padding-box;
line-height: @line-height-base;
display: block !important;
&-week-number {
width: 286px;
@ -23,38 +24,31 @@
&-header {
padding: 0 10px;
height: 34px;
line-height: 24px;
text-align: center;
user-select: none;
-webkit-user-select: none;
border-bottom: 1px solid #e9e9e9;
> a {
a {
font-weight: bold;
display: inline-block;
padding: 4px 5px;
text-align: center;
width: 30px;
color: #666;
line-height: 34px;
&:hover {
cursor: pointer;
color: #23c0fa;
}
}
.@{prefixCalendarClass}-prev-month-btn {
position: absolute;
left: 25px;
}
.@{prefixCalendarClass}-next-month-btn {
position: absolute;
right: 25px;
}
.@{prefixCalendarClass}-year-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 {
@ -70,12 +64,20 @@
top: 0;
}
&-next-year-btn {
right: 0;
&-prev-year-btn {
left: 7px;
}
&-prev-year-btn {
left: 0;
&-next-year-btn {
right: 7px;
}
&-prev-month-btn {
left: 29px;
}
&-next-month-btn {
right: 29px;
}
&-calendar-body {
@ -177,20 +179,39 @@
height: 42px;
line-height: 42px;
border-top: 1px solid #e9e9e9;
}
&-footer-btn {
text-align: center;
display: block;
}
&-footer > div {
display: inline-block;
}
.@{prefixCalendarClass}-today-btn, .@{prefixCalendarClass}-clear-btn {
.@{prefixCalendarClass}-today-btn,
.@{prefixCalendarClass}-clear-btn {
display: inline-block;
text-align: center;
margin-left: 8px;
&:hover {
cursor: pointer;
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;
user-select: none;
-webkit-user-select: none;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #e9e9e9;
> a {
font-weight: bold;
@ -110,4 +110,4 @@
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
}
}

View File

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

View File

@ -1,7 +1,19 @@
@import "../../mixins/input";
.@{prefixCalendarClass}-time-input {
height: 25px;
width: 40px;
.ant-input;
.@{prefixCalendarClass}-time {
> span {
margin: 0 2px;
}
~ .@{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;
user-select: none;
-webkit-user-select: none;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #e9e9e9;
}
.@{prefixCalendarClass}-time-panel-body {
@ -35,7 +35,6 @@
border-radius: 4px;
}
.@{prefixCalendarClass}-time-panel-table {
table-layout: fixed;
width: 100%;
@ -44,15 +43,14 @@
.@{prefixCalendarClass}-time-panel-cell {
text-align: center;
height: 42px;
height: 40px;
vertical-align: middle;
}
.@{prefixCalendarClass}-time-panel-time {
line-height: 26px;
line-height: 24px;
display: block;
border-radius: 4px;
width:26px;
margin: 0 auto;
&:hover {
@ -70,4 +68,4 @@
background: #3fc7fa;
color: #fff;
}
}
}

View File

@ -21,12 +21,12 @@
text-align: center;
user-select: none;
-webkit-user-select: none;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #e9e9e9;
> a {
font-weight: bold;
display: inline-block;
padding: 4px 5px;
padding: 0 5px;
text-align: center;
width: 30px;
@ -119,4 +119,4 @@
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
}
}