Custom Shaped Day Marks
The default shape of day marks are dots. If you want to mark a day for something you can add one or more colored dots through the marked option. There are cases when you might want to change the shape of the marks or use different marks that carry specific meaning.
When you want to update the shape you can simply use CSS and override the styling: .mbsc-calendar-marks .mbsc-calendar-mark { // you custom override }.
If you need to show different shapes, you can pass a custom CSS class in the markCssClass property of the marked option. Use it to show triangles, squares and dots for different marks.
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
mobiscroll.datepicker('#demo', {
controls: ['calendar'],
select: 'range',
display: 'inline',
marked: [
{ date: '2026-10-02T00:00', color: '#46c4f3', markCssClass: 'square-mark' },
{ date: '2026-10-04T00:00', color: '#159833', markCssClass: 'triangle-mark' },
{ date: '2026-10-06T00:00', color: '#b05cbf', markCssClass: 'square-mark' },
{ date: '2026-10-06T00:00', color: '#3adecf', markCssClass: 'triangle-mark' },
{ date: '2026-10-06T00:00', color: '#c8d235' },
{ date: '2026-10-08T00:00', color: '#46c4f3' },
{ date: '2026-10-10T00:00', color: '#7e56bd', markCssClass: 'square-mark' },
{ date: '2026-10-13T00:00', color: '#f13f77' },
{ date: '2026-10-16T00:00', color: '#21b326', markCssClass: 'square-mark' },
{ date: '2026-10-16T00:00', color: '#ffa93a', markCssClass: 'triangle-mark' },
{ date: '2026-10-18T00:00', color: '#89d7c9', markCssClass: 'triangle-mark' },
{ date: '2026-10-21T00:00', color: '#ffc400', markCssClass: 'square-mark' },
{ date: '2026-10-26T00:00', color: '#8dec7d', markCssClass: 'triangle-mark' },
],
});
<div id="demo"></div>
.mbsc-calendar-mark.triangle-mark {
content: '';
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
transform-origin: left bottom;
border-radius: 0;
width: 8px;
height: 8px;
position: relative;
top: -2px;
right: 1px;
}
.mbsc-calendar-mark.square-mark {
border-radius: 0;
}