No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_bootstrap-datepicker.scss 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. //
  2. // Bootstrap datepicker
  3. //
  4. .datepicker {
  5. border-radius: $datepicker-border-radius;
  6. &-inline {
  7. width: 220px;
  8. }
  9. direction: ltr;
  10. &-rtl {
  11. direction: rtl;
  12. &.dropdown-menu {
  13. left: auto;
  14. }
  15. table tr td span {
  16. float: right;
  17. }
  18. }
  19. &-dropdown {
  20. top: 0;
  21. left: 0;
  22. padding: $datepicker-dropdown-padding;
  23. @include box-shadow($dropdown-box-shadow);
  24. &.datepicker-orient-left:before {
  25. left: 6px;
  26. }
  27. &.datepicker-orient-left:after {
  28. left: 7px;
  29. }
  30. &.datepicker-orient-right:before {
  31. right: 6px;
  32. }
  33. &.datepicker-orient-right:after {
  34. right: 7px;
  35. }
  36. &.datepicker-orient-bottom:before {
  37. top: -7px;
  38. }
  39. &.datepicker-orient-bottom:after {
  40. top: -6px;
  41. }
  42. &.datepicker-orient-top:before {
  43. bottom: -7px;
  44. border-bottom: 0;
  45. border-top: 7px solid $datepicker-dropdown-border;
  46. }
  47. &.datepicker-orient-top:after {
  48. bottom: -6px;
  49. border-bottom: 0;
  50. border-top: 6px solid $datepicker-dropdown-bg;
  51. }
  52. }
  53. table {
  54. margin: 0;
  55. -webkit-touch-callout: none;
  56. user-select: none;
  57. tr {
  58. td {
  59. border-radius: $datepicker-cell-border-radius;
  60. }
  61. th {
  62. border-radius: $datepicker-header-cell-border-radius;
  63. font-weight: 500;
  64. }
  65. td,
  66. th {
  67. transition: $datepicker-cell-transition;
  68. width: $datepicker-cell-width;
  69. height: $datepicker-cell-height;
  70. border: none;
  71. text-align: center;
  72. font-size: $font-size-sm;
  73. }
  74. }
  75. }
  76. // Inline display inside a table presents some problems with
  77. // border and background colors.
  78. .table-striped & table tr {
  79. td,
  80. th {
  81. background-color: transparent;
  82. }
  83. }
  84. table tr td {
  85. &.old,
  86. &.new {
  87. color: $datepicker-disabled-old-new-color;
  88. }
  89. &.day:hover,
  90. &.focused {
  91. background: $datepicker-cell-hover-background;
  92. cursor: pointer;
  93. }
  94. &.disabled,
  95. &.disabled:hover {
  96. background: none;
  97. color: $datepicker-disabled-cell-color;
  98. cursor: default;
  99. }
  100. &.highlighted {
  101. border-radius: 0;
  102. &.focused {
  103. background: $datepicker-highlighted-bg
  104. }
  105. &.disabled,
  106. &.disabled:active {
  107. background: $datepicker-highlighted-bg;
  108. color: $gray-400;
  109. }
  110. }
  111. &.today {
  112. background: lighten($datepicker-active-background, 45%);
  113. &.focused {
  114. background: lighten($gray-400, 58%);
  115. }
  116. &.disabled,
  117. &.disabled:active {
  118. background: lighten($gray-400, 58%);
  119. color: $btn-link-disabled-color;
  120. }
  121. }
  122. // Range selection
  123. &.range {
  124. background: $datepicker-range-background;
  125. color: $datepicker-range-color;
  126. border-radius: 0;
  127. &.focused {
  128. background: darken($datepicker-range-cell-focused-background, 3%);
  129. }
  130. &.disabled,
  131. &.disabled:active,
  132. &.day.disabled:hover {
  133. background: darken($datepicker-active-background, 10%);
  134. color: lighten($datepicker-active-background, 10%);
  135. }
  136. }
  137. &.range.highlighted {
  138. &.focused {
  139. background: darken($datepicker-range-highlighted-bg, 10%);
  140. }
  141. &.disabled,
  142. &.disabled:active {
  143. background: $datepicker-range-highlighted-bg;
  144. color: $datepicker-disabled-cell-color;
  145. }
  146. }
  147. &.range.today {
  148. &.disabled,
  149. &.disabled:active {
  150. background: $blue;
  151. color: $white;
  152. }
  153. }
  154. &.day.range-start {
  155. border-top-right-radius: 0;
  156. border-bottom-right-radius: 0;
  157. }
  158. &.day.range-end {
  159. border-top-left-radius: 0;
  160. border-bottom-left-radius: 0;
  161. }
  162. &.day.range-start.range-end {
  163. border-radius: $datepicker-cell-border-radius;
  164. }
  165. &.selected,
  166. &.selected.highlighted,
  167. &.selected:hover,
  168. &.selected.highlighted:hover,
  169. &.day.range:hover {
  170. background: $datepicker-active-background;
  171. color: $datepicker-active-color;
  172. }
  173. &.active,
  174. &.active.highlighted,
  175. &.active:hover,
  176. &.active.highlighted:hover {
  177. background: $datepicker-active-background;
  178. color: $datepicker-active-color;
  179. box-shadow: $datepicker-active-box-shadow;
  180. }
  181. span {
  182. display: block;
  183. width: 23%;
  184. height: 54px;
  185. line-height: 54px;
  186. float: left;
  187. margin: 1%;
  188. cursor: pointer;
  189. border-radius: 4px;
  190. &:hover,
  191. &.focused {
  192. background: $gray-200;
  193. }
  194. &.disabled,
  195. &.disabled:hover {
  196. background: none;
  197. color: $datepicker-disabled-cell-color;
  198. cursor: default;
  199. }
  200. &.active,
  201. &.active:hover,
  202. &.active.disabled,
  203. &.active.disabled:hover {
  204. text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
  205. }
  206. &.old,
  207. &.new {
  208. color: $btn-link-disabled-color;
  209. }
  210. }
  211. }
  212. .datepicker-switch {
  213. width: 145px;
  214. }
  215. .datepicker-switch,
  216. .prev,
  217. .next,
  218. tfoot tr th {
  219. cursor: pointer;
  220. &:hover {
  221. background: $gray-200;
  222. }
  223. }
  224. .prev,
  225. .next {
  226. &.disabled {
  227. visibility: hidden;
  228. }
  229. }
  230. // Basic styling for calendar-week cells
  231. .cw {
  232. font-size: 10px;
  233. width: 12px;
  234. padding: 0 2px 0 5px;
  235. vertical-align: middle;
  236. }
  237. }