_datepicker.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. @mixin extjs-datepicker {
  2. .#{$prefix}datepicker {
  3. border: $datepicker-border;
  4. background-color: $datepicker-background-color;
  5. position: relative;
  6. a {
  7. @extend .outline-none;
  8. color: $datepicker-monthpicker-item-color;
  9. text-decoration: none;
  10. border-width: 0;
  11. }
  12. }
  13. .#{$prefix}datepicker-inner,
  14. .#{$prefix}datepicker-inner td,
  15. .#{$prefix}datepicker-inner th {
  16. border-collapse: separate;
  17. }
  18. .#{$prefix}datepicker-header {
  19. position: relative;
  20. height: 26px;
  21. // @if $datepicker-header-background-gradient {
  22. // @include background-gradient($datepicker-header-background-color, $datepicker-header-background-gradient);
  23. // } @else {
  24. background-color: #D8DDE3;
  25. // }
  26. }
  27. .#{$prefix}datepicker-prev,
  28. .#{$prefix}datepicker-next {
  29. position: absolute;
  30. top: 5px;
  31. width: 18px;
  32. a {
  33. display: block;
  34. width: 16px;
  35. height: 16px;
  36. background-position: top;
  37. background-repeat: no-repeat;
  38. cursor: pointer;
  39. text-decoration: none !important;
  40. @include opacity(.7);
  41. &:hover {
  42. @include opacity(1);
  43. }
  44. }
  45. }
  46. .#{$prefix}datepicker-next {
  47. right: 5px;
  48. a {
  49. background-image: theme-background-image($theme-name, $datepicker-next-image);
  50. }
  51. }
  52. .#{$prefix}datepicker-prev {
  53. left: 5px;
  54. a {
  55. background-image: theme-background-image($theme-name, $datepicker-prev-image);
  56. }
  57. }
  58. .#{$prefix}item-disabled .#{$prefix}datepicker-prev a:hover,
  59. .#{$prefix}item-disabled .#{$prefix}datepicker-next a:hover {
  60. @include opacity(.6);
  61. }
  62. .#{$prefix}datepicker-month {
  63. padding-top: 3px;
  64. .#{$prefix}btn,
  65. button,
  66. .#{$prefix}btn-tc,
  67. .#{$prefix}btn-tl,
  68. .#{$prefix}btn-tr,
  69. .#{$prefix}btn-mc,
  70. .#{$prefix}btn-ml,
  71. .#{$prefix}btn-mr,
  72. .#{$prefix}btn-bc,
  73. .#{$prefix}btn-bl,
  74. .#{$prefix}btn-br {
  75. background: transparent !important;
  76. border-width: 0 !important;
  77. }
  78. span {
  79. color: #2669B4 !important;
  80. text-shadow: 0 0 0 !important;
  81. font-weight: normal !important;
  82. }
  83. .#{$prefix}btn-split-right {
  84. background-image: theme-background-image($theme-name, $datepicker-month-arrow-image);
  85. padding-right: 12px;
  86. }
  87. }
  88. .#{$prefix}datepicker-next {
  89. text-align: right;
  90. }
  91. .#{$prefix}datepicker-month {
  92. //width: 120px;
  93. text-align: center;
  94. button {
  95. color: #2669B4 !important;
  96. }
  97. }
  98. table.#{$prefix}datepicker-inner {
  99. width: 100%;
  100. table-layout: fixed;
  101. th {
  102. width: 25px;
  103. height: 19px;
  104. padding: 0;
  105. color: $datepicker-th-color;
  106. font: $datepicker-th-font;
  107. font-weight: bold;
  108. text-align: $datepicker-th-text-align;
  109. // border-bottom: 1px solid $datepicker-th-border-bottom-color;
  110. border-collapse: separate;
  111. @if $datepicker-th-background-gradient {
  112. // @include background-gradient($datepicker-th-background-color, $datepicker-th-background-gradient);
  113. } @else {
  114. // background-color: $datepicker-th-background-color;
  115. }
  116. cursor: default;
  117. span {
  118. display: block;
  119. padding-right: 7px;
  120. }
  121. }
  122. tr {
  123. height: 20px;
  124. }
  125. td {
  126. // border: $datepicker-border-width $datepicker-border-style;
  127. height: $datepicker-td-height;
  128. // border-color: $datepicker-background-color;
  129. text-align: right;
  130. padding: 0;
  131. }
  132. a {
  133. padding: 3px 5px 3px 3px;
  134. display: block;
  135. // @tag iezoomhack
  136. font: normal $font-size $font-family;
  137. color: $datepicker-item-color;
  138. text-decoration: none;
  139. text-align: right;
  140. }
  141. .#{$prefix}datepicker-active {
  142. cursor: pointer;
  143. color: black;
  144. }
  145. a:hover,
  146. .#{$prefix}datepicker-disabled a:hover {
  147. text-decoration: none !important;
  148. background: #F2FAFF;
  149. }
  150. .#{$prefix}datepicker-selected {
  151. a {
  152. // background: repeat-x left top;
  153. // background-color: $datepicker-selected-item-background-color;
  154. // border: 1px solid $datepicker-selected-item-border-color;
  155. color: #fff;
  156. background-color: #0E56B0;
  157. @include border-radius(4px);
  158. }
  159. }
  160. .#{$prefix}datepicker-today {
  161. a {
  162. // border: $datepicker-border-width $datepicker-border-style;
  163. // border-color: $datepicker-today-item-border-color;
  164. color: #28A02A;
  165. // background-color: #0E56B0;
  166. position: relative;
  167. top: -1px;
  168. &:hover {
  169. background: #28A02A;
  170. color: #fff;
  171. @include border-radius(4px);
  172. }
  173. }
  174. &.#{$prefix}datepicker-selected a {
  175. background: #28A02A;
  176. color: #fff;
  177. @include border-radius(4px);
  178. }
  179. span {
  180. font-weight: bold;
  181. }
  182. }
  183. .#{$prefix}datepicker-prevday,
  184. .#{$prefix}datepicker-nextday {
  185. a {
  186. text-decoration: none !important;
  187. color: #aaa;
  188. }
  189. }
  190. .#{$prefix}datepicker-disabled a {
  191. cursor: default;
  192. background-color: #eee;
  193. color: #bbb;
  194. }
  195. }
  196. .#{$prefix}datepicker-footer,
  197. .#{$prefix}monthpicker-buttons {
  198. position: relative;
  199. // border-top: $datepicker-border-width $datepicker-border-style $datepicker-footer-border-top-color;
  200. // @if $datepicker-footer-background-gradient {
  201. // @include background-gradient($datepicker-footer-background-color, $datepicker-footer-background-gradient);
  202. // } @else {
  203. // background-color: $datepicker-footer-background-color;
  204. // }
  205. text-align: center;
  206. .#{$prefix}btn {
  207. position: relative;
  208. margin: 4px;
  209. }
  210. }
  211. .#{$prefix}item-disabled .#{$prefix}datepicker-inner a:hover {
  212. background: none;
  213. }
  214. // month picker
  215. .#{$prefix}datepicker .#{$prefix}monthpicker {
  216. position: absolute;
  217. left: 0;
  218. top: 0;
  219. }
  220. .#{$prefix}monthpicker {
  221. border: $datepicker-border;
  222. background-color: $datepicker-background-color;
  223. }
  224. .#{$prefix}monthpicker-months,
  225. .#{$prefix}monthpicker-years {
  226. float: left;
  227. height: $datepicker-monthpicker-height;
  228. width: 88px;
  229. }
  230. .#{$prefix}monthpicker-item {
  231. float: left;
  232. margin: 4px 0 5px 0;
  233. font: normal ceil($font-size * .9) $font-family;
  234. text-align: center;
  235. vertical-align: middle;
  236. height: 18px;
  237. width: 43px;
  238. border: 0 none;
  239. a {
  240. display: block;
  241. margin: 0 5px 0 5px;
  242. text-decoration: none;
  243. color: $datepicker-monthpicker-item-color;
  244. border: $datepicker-monthpicker-item-border;
  245. line-height: 17px;
  246. &:hover {
  247. background-color: $datepicker-monthpicker-item-hover-background-color;
  248. }
  249. &.#{$prefix}monthpicker-selected {
  250. background-color: $datepicker-monthpicker-item-selected-background-color;
  251. border: $datepicker-monthpicker-item-selected-border;
  252. }
  253. }
  254. }
  255. .#{$prefix}monthpicker-months {
  256. border-right: $datepicker-border;
  257. width: 87px;
  258. }
  259. .#{$prefix}monthpicker-years .#{$prefix}monthpicker-item {
  260. width: 44px;
  261. }
  262. .#{$prefix}monthpicker-yearnav {
  263. height: 28px;
  264. button {
  265. background-image: theme-background-image($theme-name, $datepicker-tool-sprite-image);
  266. height: 15px;
  267. width: 15px;
  268. padding: 0;
  269. margin: 6px 12px 5px 15px;
  270. @extend .outline-none;
  271. border: 0;
  272. &::-moz-focus-inner {
  273. border: 0;
  274. padding: 0;
  275. }
  276. }
  277. }
  278. .#{$prefix}monthpicker-yearnav-next {
  279. background-position: 0 -120px;
  280. }
  281. .#{$prefix}monthpicker-yearnav-next-over {
  282. cursor: pointer;
  283. cursor: hand;
  284. background-position: -15px -120px;
  285. }
  286. .#{$prefix}monthpicker-yearnav-prev {
  287. background-position: 0 -105px;
  288. }
  289. .#{$prefix}monthpicker-yearnav-prev-over {
  290. cursor: pointer;
  291. cursor: hand;
  292. background-position: -15px -105px;
  293. }
  294. .#{$prefix}monthpicker-small {
  295. .#{$prefix}monthpicker-item {
  296. margin: 2px 0 2px 0;
  297. }
  298. .#{$prefix}monthpicker-yearnav {
  299. height: 23px;
  300. }
  301. .#{$prefix}monthpicker-months, .#{$prefix}monthpicker-years {
  302. height: 136px;
  303. }
  304. }
  305. @if $include-ie {
  306. .#{$prefix}quirks {
  307. .#{$prefix}ie7,
  308. .#{$prefix}ie8 {
  309. .#{$prefix}monthpicker-buttons {
  310. .#{$prefix}btn {
  311. margin-top: 2px;
  312. }
  313. }
  314. }
  315. .#{$prefix}monthpicker-small .#{$prefix}monthpicker-yearnav button {
  316. margin-top: 3px;
  317. margin-bottom: 3px;
  318. }
  319. }
  320. .#{$prefix}ie6 .#{$prefix}monthpicker-small .#{$prefix}monthpicker-yearnav button {
  321. margin-top: 3px;
  322. margin-bottom: 3px;
  323. }
  324. }
  325. //nlg support
  326. @if not $supports-gradients or $compile-all {
  327. .#{$prefix}nlg {
  328. @if $datepicker-header-background-gradient != null {
  329. .#{$prefix}datepicker-header {
  330. background-image: theme-background-image($theme-name, 'datepicker/datepicker-header-bg.gif');
  331. background-repeat: repeat-x;
  332. background-position: top left;
  333. }
  334. }
  335. @if $datepicker-footer-background-gradient != null {
  336. .#{$prefix}datepicker-footer,
  337. .#{$prefix}monthpicker-buttons {
  338. background-image: theme-background-image($theme-name, 'datepicker/datepicker-footer-bg.gif');
  339. background-repeat: repeat-x;
  340. background-position: top left;
  341. }
  342. }
  343. }
  344. }
  345. }