RangePicker.less 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. @input-box-height: 34px;
  2. .@{calendar-prefix-cls}-range-picker-input {
  3. width: 44%;
  4. height: 99%;
  5. text-align: center;
  6. background-color: transparent;
  7. border: 0;
  8. outline: 0;
  9. .placeholder();
  10. &[disabled] {
  11. cursor: not-allowed;
  12. }
  13. }
  14. .@{calendar-prefix-cls}-range-picker-separator {
  15. display: inline-block;
  16. min-width: 10px;
  17. height: 100%;
  18. color: @text-color-secondary;
  19. white-space: nowrap;
  20. text-align: center;
  21. vertical-align: top;
  22. pointer-events: none;
  23. }
  24. .@{calendar-prefix-cls}-range {
  25. width: 552px;
  26. overflow: hidden;
  27. .@{calendar-prefix-cls}-date-panel {
  28. &::after {
  29. display: block;
  30. clear: both;
  31. height: 0;
  32. visibility: hidden;
  33. content: '.';
  34. }
  35. }
  36. &-part {
  37. position: relative;
  38. width: 50%;
  39. }
  40. &-left {
  41. float: left;
  42. .@{calendar-prefix-cls} {
  43. &-time-picker-inner {
  44. border-right: 1px solid @border-color-split;
  45. }
  46. }
  47. }
  48. &-right {
  49. float: right;
  50. .@{calendar-prefix-cls} {
  51. &-time-picker-inner {
  52. border-left: 1px solid @border-color-split;
  53. }
  54. }
  55. }
  56. &-middle {
  57. position: absolute;
  58. left: 50%;
  59. z-index: 1;
  60. height: @input-box-height;
  61. margin: 1px 0 0;
  62. padding: 0 200px 0 0;
  63. color: @text-color-secondary;
  64. line-height: @input-box-height;
  65. text-align: center;
  66. transform: translateX(-50%);
  67. pointer-events: none;
  68. }
  69. &-right .@{calendar-prefix-cls}-date-input-wrap {
  70. margin-left: -90px;
  71. }
  72. &.@{calendar-prefix-cls}-time &-middle {
  73. padding: 0 10px 0 0;
  74. transform: translateX(-50%);
  75. }
  76. .@{calendar-prefix-cls}-today
  77. :not(.@{calendar-prefix-cls}-disabled-cell)
  78. :not(.@{calendar-prefix-cls}-last-month-cell)
  79. :not(.@{calendar-prefix-cls}-next-month-btn-day) {
  80. .@{calendar-prefix-cls}-date {
  81. color: @primary-color;
  82. background: @primary-2;
  83. border-color: @primary-color;
  84. }
  85. }
  86. .@{calendar-prefix-cls}-selected-start-date,
  87. .@{calendar-prefix-cls}-selected-end-date {
  88. .calendar-selected-cell;
  89. }
  90. &.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-date-input-wrap {
  91. margin-left: 0;
  92. }
  93. .@{calendar-prefix-cls}-input-wrap {
  94. position: relative;
  95. height: @input-box-height;
  96. }
  97. .@{calendar-prefix-cls}-input,
  98. .@{calendar-timepicker-prefix-cls}-input {
  99. .input;
  100. height: @input-height-sm;
  101. padding-right: 0;
  102. padding-left: 0;
  103. line-height: @input-height-sm;
  104. border: 0;
  105. box-shadow: none;
  106. &:focus {
  107. box-shadow: none;
  108. }
  109. }
  110. .@{calendar-timepicker-prefix-cls}-icon {
  111. display: none;
  112. }
  113. &.@{calendar-prefix-cls}-week-number {
  114. width: 574px;
  115. .@{calendar-prefix-cls}-range-part {
  116. width: 286px;
  117. }
  118. }
  119. .@{calendar-prefix-cls}-year-panel,
  120. .@{calendar-prefix-cls}-month-panel,
  121. .@{calendar-prefix-cls}-decade-panel {
  122. top: @input-box-height;
  123. }
  124. .@{calendar-prefix-cls}-month-panel .@{calendar-prefix-cls}-year-panel {
  125. top: 0;
  126. }
  127. .@{calendar-prefix-cls}-decade-panel-table,
  128. .@{calendar-prefix-cls}-year-panel-table,
  129. .@{calendar-prefix-cls}-month-panel-table {
  130. height: 208px;
  131. }
  132. .@{calendar-prefix-cls}-in-range-cell {
  133. position: relative;
  134. border-radius: 0;
  135. > div {
  136. position: relative;
  137. z-index: 1;
  138. }
  139. &::before {
  140. position: absolute;
  141. top: 4px;
  142. right: 0;
  143. bottom: 4px;
  144. left: 0;
  145. display: block;
  146. background: @item-active-bg;
  147. border: 0;
  148. border-radius: 0;
  149. content: '';
  150. }
  151. }
  152. .@{calendar-prefix-cls}-footer-extra {
  153. float: left;
  154. }
  155. // `div` for selector specificity
  156. div&-quick-selector {
  157. text-align: left;
  158. > a {
  159. margin-right: 8px;
  160. }
  161. }
  162. .@{calendar-prefix-cls},
  163. .@{calendar-prefix-cls}-month-panel,
  164. .@{calendar-prefix-cls}-year-panel,
  165. .@{calendar-prefix-cls}-decade-panel {
  166. &-header {
  167. border-bottom: 0;
  168. }
  169. &-body {
  170. border-top: @border-width-base @border-style-base @border-color-split;
  171. }
  172. }
  173. &.@{calendar-prefix-cls}-time {
  174. .@{calendar-timepicker-prefix-cls} {
  175. top: 68px;
  176. z-index: 2; // cover .ant-calendar-range .ant-calendar-in-range-cell > div (z-index: 1)
  177. width: 100%;
  178. height: 207px;
  179. &-panel {
  180. height: 267px;
  181. margin-top: -34px;
  182. }
  183. &-inner {
  184. height: 100%;
  185. padding-top: 40px;
  186. background: none;
  187. }
  188. &-combobox {
  189. display: inline-block;
  190. height: 100%;
  191. background-color: @component-background;
  192. border-top: @border-width-base @border-style-base @border-color-split;
  193. }
  194. &-select {
  195. height: 100%;
  196. ul {
  197. max-height: 100%;
  198. }
  199. }
  200. }
  201. .@{calendar-prefix-cls}-footer .@{calendar-prefix-cls}-time-picker-btn {
  202. margin-right: 8px;
  203. }
  204. .@{calendar-prefix-cls}-today-btn {
  205. height: 22px;
  206. margin: 8px 12px;
  207. line-height: 22px;
  208. }
  209. }
  210. &-with-ranges.@{calendar-prefix-cls}-time .@{calendar-timepicker-prefix-cls} {
  211. height: 233px;
  212. }
  213. }
  214. .@{calendar-prefix-cls}-range.@{calendar-prefix-cls}-show-time-picker {
  215. .@{calendar-prefix-cls}-body {
  216. border-top-color: transparent;
  217. }
  218. }