Browse Source

update datepicker style

pull/20/head
afc163 10 years ago
parent
commit
a73aff66f8
  1. 1
      components/datepicker/index.jsx
  2. 2
      package.json
  3. 4
      static/style.css
  4. 63
      style/components/datepicker/Calendar.less
  5. 4
      style/components/datepicker/DecadePanel.less
  6. 4
      style/components/datepicker/MonthPanel.less
  7. 16
      style/components/datepicker/Time.less
  8. 10
      style/components/datepicker/TimePanel.less
  9. 6
      style/components/datepicker/YearPanel.less

1
components/datepicker/index.jsx

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

2
package.json

@ -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",

4
static/style.css

@ -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 {

63
style/components/datepicker/Calendar.less

@ -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 {
padding: 0px 2px;
}
.@{prefixCalendarClass}-month-select {
width: 140px;
> 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;
}
&-prev-year-btn {
left: 7px;
}
&-next-year-btn {
right: 0;
right: 7px;
}
&-prev-year-btn {
left: 0;
&-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;
}
}

4
style/components/datepicker/DecadePanel.less

@ -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);
}
}
}

4
style/components/datepicker/MonthPanel.less

@ -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;

16
style/components/datepicker/Time.less

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

10
style/components/datepicker/TimePanel.less

@ -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;
}
}
}

6
style/components/datepicker/YearPanel.less

@ -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);
}
}
}

Loading…
Cancel
Save