ngx-bootstrap
ngx-bootstrap copied to clipboard
Highlight whole week in daterange picker
Description: Highlight whole week in daterange picker.
Expected Result. Is it possible to select/highlight whole week in the date picker. In response we have managed to send the week from the date. But the requirement is to display/highlight the week . Suppose wednesday from week 1 to wednesday Week2 is selected. In that case date rangepicker should highlight whole weeks. i.e. Monday from Week 1 to Sunday Week 2.
Refer Stackblitz example implemented for week response https://stackblitz.com/edit/angular-7ilfcu
+1 Just found this issue which is exactly what I would need as well :)
2024 :) Does anyone know how to do it?
Ok, maybe it will help someone. I wrote some SCSS in global styles.scss
file of Angular to achive the result:
.bs-datepicker-body tr {
&:hover, &:has(span.selected) {
background-color: red;
}
}
So, basically I just check if tr
has span.selected
element or user hovers on it. If yes, I apply styles on tr
row element.