ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Highlight whole week in daterange picker

Open manhar-developer opened this issue 5 years ago • 3 comments

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

manhar-developer avatar Nov 01 '19 05:11 manhar-developer

+1 Just found this issue which is exactly what I would need as well :)

andersb avatar Mar 24 '21 21:03 andersb

2024 :) Does anyone know how to do it?

zhandosainabek avatar Apr 11 '24 12:04 zhandosainabek

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.

zhandosainabek avatar Apr 11 '24 13:04 zhandosainabek