datepicker-bs4.css 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. .datepicker {
  2. display: none;
  3. }
  4. .datepicker.active {
  5. display: block;
  6. }
  7. .datepicker-dropdown {
  8. position: absolute;
  9. top: 0;
  10. left: 0;
  11. z-index: 1000;
  12. padding-top: 4px;
  13. }
  14. .datepicker-dropdown.datepicker-orient-top {
  15. padding-top: 0;
  16. padding-bottom: 4px;
  17. }
  18. .datepicker-picker {
  19. display: inline-block;
  20. border-radius: 0.25rem;
  21. background-color: #fff;
  22. }
  23. .datepicker-dropdown .datepicker-picker {
  24. box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  25. }
  26. .datepicker-picker span {
  27. display: block;
  28. flex: 1;
  29. border: 0;
  30. border-radius: 0.25rem;
  31. cursor: default;
  32. text-align: center;
  33. -webkit-touch-callout: none;
  34. -webkit-user-select: none;
  35. -moz-user-select: none;
  36. -ms-user-select: none;
  37. user-select: none;
  38. }
  39. .datepicker-main {
  40. padding: 2px;
  41. }
  42. .datepicker-footer {
  43. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
  44. background-color: #f8f9fa;
  45. }
  46. .datepicker-controls, .datepicker-view, .datepicker-view .days-of-week, .datepicker-grid {
  47. display: flex;
  48. }
  49. .datepicker-grid {
  50. flex-wrap: wrap;
  51. }
  52. .datepicker-view .dow, .datepicker-view .days .datepicker-cell {
  53. flex-basis: 14.28571%;
  54. }
  55. .datepicker-view.datepicker-grid .datepicker-cell {
  56. flex-basis: 25%;
  57. }
  58. .datepicker-view .week, .datepicker-cell {
  59. height: 2.25rem;
  60. line-height: 2.25rem;
  61. }
  62. .datepicker-title {
  63. box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1);
  64. background-color: #f8f9fa;
  65. padding: 0.375rem 0.75rem;
  66. text-align: center;
  67. font-weight: 700;
  68. }
  69. .datepicker-header .datepicker-controls {
  70. padding: 2px 2px 0;
  71. }
  72. .datepicker-controls .btn {
  73. border-color: #f8f9fa;
  74. background-color: #fff;
  75. }
  76. .datepicker-controls .btn:hover {
  77. border-color: #dae0e5;
  78. background-color: #e2e6ea;
  79. color: #212529;
  80. }
  81. .datepicker-controls .btn:focus {
  82. border-color: #dae0e5;
  83. box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
  84. background-color: #e2e6ea;
  85. color: #212529;
  86. }
  87. .datepicker-controls .btn:disabled {
  88. border-color: #f8f9fa;
  89. background-color: #f8f9fa;
  90. color: #212529;
  91. }
  92. .datepicker-controls .btn:not(:disabled):active {
  93. border-color: #d3d9df;
  94. background-color: #dae0e5;
  95. color: #212529;
  96. }
  97. .datepicker-controls .btn:not(:disabled):active:focus {
  98. box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
  99. }
  100. .datepicker-header .datepicker-controls .btn {
  101. border-color: transparent;
  102. font-weight: bold;
  103. }
  104. .datepicker-footer .datepicker-controls .btn {
  105. margin: calc(0.375rem - 1px) 0.375rem;
  106. border-radius: 0.2rem;
  107. width: 100%;
  108. font-size: 0.875rem;
  109. }
  110. .datepicker-controls .view-switch {
  111. flex: auto;
  112. }
  113. .datepicker-controls .prev-btn,
  114. .datepicker-controls .next-btn {
  115. padding-right: 0.375rem;
  116. padding-left: 0.375rem;
  117. width: 2.25rem;
  118. }
  119. .datepicker-controls .prev-btn.disabled,
  120. .datepicker-controls .next-btn.disabled {
  121. visibility: hidden;
  122. }
  123. .datepicker-view .dow {
  124. height: 1.5rem;
  125. line-height: 1.5rem;
  126. font-size: 0.9375rem;
  127. font-weight: 700;
  128. }
  129. .datepicker-view .week {
  130. width: 2.25rem;
  131. color: #dee2e6;
  132. font-size: 0.875rem;
  133. }
  134. @media (max-width: 22.5rem) {
  135. .datepicker-view .week {
  136. width: 1.96875rem;
  137. }
  138. }
  139. .datepicker-grid {
  140. width: 15.75rem;
  141. }
  142. @media (max-width: 22.5rem) {
  143. .calendar-weeks + .days .datepicker-grid {
  144. width: 13.78125rem;
  145. }
  146. }
  147. .datepicker-cell:not(.disabled):hover {
  148. background-color: #f9f9f9;
  149. cursor: pointer;
  150. }
  151. .datepicker-cell.focused:not(.selected) {
  152. background-color: #f1f3f5;
  153. }
  154. .datepicker-cell.selected, .datepicker-cell.selected:hover {
  155. background-color: #007bff;
  156. color: #fff;
  157. font-weight: 600;
  158. }
  159. .datepicker-cell.disabled {
  160. color: #6c757d;
  161. }
  162. .datepicker-cell.prev:not(.disabled), .datepicker-cell.next:not(.disabled) {
  163. color: #6c757d;
  164. }
  165. .datepicker-cell.prev.selected, .datepicker-cell.next.selected {
  166. color: #e6e6e6;
  167. }
  168. .datepicker-cell.highlighted:not(.selected):not(.range):not(.today) {
  169. border-radius: 0;
  170. background-color: #f8f9fa;
  171. }
  172. .datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover {
  173. background-color: #f1f3f5;
  174. }
  175. .datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused {
  176. background-color: #f1f3f5;
  177. }
  178. .datepicker-cell.today:not(.selected) {
  179. background-color: #20c997;
  180. }
  181. .datepicker-cell.today:not(.selected):not(.disabled) {
  182. color: #fff;
  183. }
  184. .datepicker-cell.today.focused:not(.selected) {
  185. background-color: #1ebe8f;
  186. }
  187. .datepicker-cell.range-start:not(.selected), .datepicker-cell.range-end:not(.selected) {
  188. background-color: #6c757d;
  189. color: #fff;
  190. }
  191. .datepicker-cell.range-start.focused:not(.selected), .datepicker-cell.range-end.focused:not(.selected) {
  192. background-color: #666f76;
  193. }
  194. .datepicker-cell.range-start {
  195. border-radius: 0.25rem 0 0 0.25rem;
  196. }
  197. .datepicker-cell.range-end {
  198. border-radius: 0 0.25rem 0.25rem 0;
  199. }
  200. .datepicker-cell.range {
  201. border-radius: 0;
  202. background-color: #e9ecef;
  203. }
  204. .datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover {
  205. background-color: #e2e6ea;
  206. }
  207. .datepicker-cell.range.disabled {
  208. color: #cbd3da;
  209. }
  210. .datepicker-cell.range.focused {
  211. background-color: #dadfe4;
  212. }
  213. .datepicker-view.datepicker-grid .datepicker-cell {
  214. height: 4.5rem;
  215. line-height: 4.5rem;
  216. }
  217. .datepicker-input.in-edit {
  218. border-color: #66b0ff;
  219. }
  220. .datepicker-input.in-edit:focus, .datepicker-input.in-edit:active {
  221. box-shadow: 0 0 0.25em 0.25em rgba(102, 176, 255, 0.2);
  222. }