Hey guys,
just want to share a little trick how to customize the bubble date / time picker.
This is my result, which can be customized as you want:
which can be achieved with adding the following code:
<style>
div.picker__holder{
background-color: #272727!important;
border: 1px solid #272727!important;
border-radius: 20px!important;
padding-bottom: 15px!important;
}
div.picker__footer{
background: none!important;}
.picker__button--today,
.picker__button--clear,
.picker__button--close {
border: 0px ;
background: #363636;
font-size: 0.8em;
font-color: #f5f5f5;
padding: 0.66em 0;
font-weight: bold;
width: 33%;
display: inline-block;
vertical-align: top;
margin-right:5px;
border-radius: 20px;
width: auto;
padding-left: 8px;
padding-right: 8px;
height: 30px;
color: #f5f5f5;
}
.picker__button--close:before {
content: "Ă—";
top: -0.1em;
vertical-align: top;
font-size: 1.1em;
margin-right: 0.35em;
color: #fb0000;
}
.picker__button--today:before {
top: -0.05em;
width: 0;
border-top: 0.66em solid #5198e6;
border-left: 0.66em solid transparent;
}
.picker__button--today:hover,
.picker__button--clear:hover,
.picker__button--close:hover {
cursor: pointer;
color: #f5f5f5;
background: #474747;
}
.picker--focused .picker__day--selected {
background: #FF0000;
color: #ffffff;
border: 0px;
}
.picker__weekday {
padding-bottom: 0.25em;
color: #f5f5f5;
}
.picker__month,
.picker__year {
font-weight: 500;
color: #f5f5f5;
}
.picker__year {
color: #f5f5f5;
font-size: 0.8em;
}
.picker__nav--prev:hover,
.picker__nav--next:hover {
background: none;
}
.picker__day--infocus:hover,
.picker__day--outfocus:hover {
cursor: pointer;
color: #e0e0e0;
background: #363636;
border-radius: 20px;
}
.picker__day--highlighted {
border: none;
}
.picker__day--selected,
.picker__day--selected:hover,
.picker--focused .picker__day--selected {
background-color: #FF0000
;
color: #ffffff;
border: 0px;
}
.picker__weekday {
padding-bottom: 0.25em;
color: #f5f5f5;
}
.picker__month,
.picker__year {
font-weight: 500;
color: #f5f5f5;
}
.picker__year {
color: #f5f5f5;
font-size: 0.8em;
}
.picker__nav--prev:hover,
.picker__nav--next:hover {
background: none;
}
.picker__day--infocus:hover,
.picker__day--outfocus:hover {
cursor: pointer;
color: #e0e0e0;
background: #363636;
border-radius: 20px;
}
.picker__day--highlighted {
border: none;
}
.picker__day--selected,
.picker__day--selected:hover,
.picker--focused .picker__day--selected {
background-color: #FF0000
!important;
color: #f5f5ff;
border-radius:20px;
}
.picker__day {
color: #f5f5f5;
}
.picker__day--today {
color: #f5f5f5;
font-weight: 1000;
}
.picker__nav--prev:before,
.picker__nav--next:before {
content: " ";
border-top: 0.5em solid transparent;
border-bottom: 0.5em solid transparent;
border-right: 0.75em solid #f5f5f5;
width: 0;
height: 0;
display: block;
margin: 0 auto;
}
.picker__nav--next:before {
border-right: 0;
border-left: 0.75em solid #f5f5f5;
}
.picker__day--highlighted {
border-color: #363636!important;
}
.picker__input.picker__input--active {
border-color: #FF0000!important;
}
.picker__list-item {
background: #272727;
color: #f5f5f5;
border-color: #f5f5f5;
}
.picker__list-item:hover {
color: #f5f5f5;
background: #474747;
border-color: #f5f5f5;
}
.picker__list-item--selected,
.picker__list-item--selected:hover,
.picker--focused .picker__list-item--selected {
background: #FF0000;
color: #f5f5f5;
border-color: #f5f5f5;
}
.picker__list-item--highlighted:hover,
.picker--focused .picker__list-item--highlighted {
cursor: pointer;
color: #f5f5f5;
background: #FF0000;
}
.picker__day--infocus:hover,
.picker__day--outfocus:hover {
cursor: pointer;
color: #f5f5f5;
background: #474747 ;
}
.picker__day--highlighted:hover,
.picker--focused .picker__day--highlighted {
cursor: pointer;
color: #f5f5f5;
background: #363636 ;
border-radius: 20px;
}
.picker__select--month,
.picker__select--year {
background-color: #363636;
color: #f5f5f5;
border: 0px ;
border-radius: 20px;
height: 2em;
margin-left: 0.25em;
margin-right: 0.25em;
}
.picker__day--selected,
.picker__day--selected:hover,
.picker--focused .picker__day--selected {
background: #FF0000;
color: #f5f5f5;
}
</style>
Steps to reproduce:
- Create an html element
- copy the code into the html document
- customize the colors as you want
- enjoy your customized date / time picker
It is also possible to change the arrows border width, add some stuff and more.
Maybe someone can also build a little plugin with some inputs to change the colours, roundness, fonts and more, as I am not into building bubble plugins yet.