0

I would need a default scroll view to 8AM- 11PM in Day/Week With a fixed Header which includes an option of choosing the Month/Day/Week and the Previous/Next/Today buttons. But the time before 8AM shld be scrollable if the user wishes to see it.

Something similar to what we have in google calendar.

Let me know how i can bring this out.

Preethi Rajaraman
  • 363
  • 1
  • 8
  • 18

2 Answers2

2

I just found a post answering the same question : https://github.com/mattlewis92/angular-calendar/issues/828

demo : https://stackblitz.com/edit/angular-w4urnk?file=index.html

Having an inner scroll for the calendar and reducing the height of the calendar (so that i dont get an outer scroll too )catered to my need.

Preethi Rajaraman
  • 363
  • 1
  • 8
  • 18
0

you can get the value using classname and set auto scroll to it: ie:

  ngDoCheck(): void {
    if( document.getElementsByClassName('cal-time') !== undefined &&  document.getElementsByClassName('cal-time').length> 0){
      let scrollbar = document.getElementsByClassName('cal-time')[16];
      scrollbar.scrollIntoView({behavior: 'smooth'});
      scrollbar.scrollIntoView(true);
    }
  }
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Swati
  • 1