This is a migrated thread and some comments may be shown as answers.

How to set visible number of appointments in scheduler DayView and WeekView

3 Answers 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Prava kafle
Top achievements
Rank 1
Prava kafle asked on 01 Sep 2011, 04:44 PM
Hi,

I would like to show only 2 appointments in each time-slot for  Week-view. If  the number of appointments exceeds 2,  I want it to show more button as in Month View.

In Day-view, I want the time-slot to expand vertically/show scroll bars  within time-slot  as in time-line view. I want  the time-slot to expand vertically to fit all appointments rather than squeezing the appointments.

I would also like to give a bright orange border to  whole column  representing today's date in month and view . Is it possible to acomplish above objectives, if yes, how can I do it?

Thanks,
Prava

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Sep 2011, 03:56 PM
Hi Prava,

The first and the second functionalities cannot be implemented by design.
 
Here is some code that looks like the third one:
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
    {
        if (RadScheduler1.SelectedView==SchedulerViewType.MonthView)
        {
            if (e.TimeSlot.Start.Date == DateTime.Today)
            {
                e.TimeSlot.CssClass = "today";
            }
            if (e.TimeSlot.Start.Date.AddDays(1) == DateTime.Today)
            {
                e.TimeSlot.CssClass = "yesterday";
            }
        }
        if (RadScheduler1.SelectedView==SchedulerViewType.WeekView)
        {
            if (e.TimeSlot.Start.Date==DateTime.Today)
            {
                 e.TimeSlot.CssClass = "today";
            }
            if (e.TimeSlot.Start.Date.AddDays(1) == DateTime.Today)
            {
                e.TimeSlot.CssClass = "yesterday";
            }
        }
    }


.today .rsDateWrap
      {
          background-color: Red !important;
      }
      .today
      {
          border-color: Red !important;
      }
       
      .yesterday
      {
          border-right-color: Red !important;
      }

Hope this will be helpful.

Greetings,
Plamen Zdravkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Prava kafle
Top achievements
Rank 1
answered on 06 Sep 2011, 04:23 PM
Hi Plamen,
For week View, I wanted a highlighted border for  the whole column (including header)  representing today's date.Current  code and style only highlights time slot in month view and week view, how can I highlight header for todays date in month view?

I want it to look as shown in images above.

Thanks,
Prava

  
0
Plamen
Telerik team
answered on 09 Sep 2011, 01:49 PM
Hello Prava,

Here is one possible way how to color the header of the current day:

function pageLoad(args) {
             $ = $telerik.$;
            var scheduler = $find('<%= RadScheduler1.ClientID %>');
            var count = 0;
            $(" .rsHorizontalHeaderTable th a").each(function (a) {
                count++;
                var t = new Date();
                var day = t.format("#yyyy-MM-dd");
                if (this.hash == day) {
                    $(" .rsHorizontalHeaderTable th:nth-child("+ count+ "n)").css("background-image", "none !Important");
                    $(" .rsHorizontalHeaderTable th:nth-child(" + count + "n)").css("background-color", "Red !Important");
                }
            })
        }

Hope this will be useful.

Kind regards,
Plamen Zdravkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Scheduler
Asked by
Prava kafle
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Prava kafle
Top achievements
Rank 1
Share this question
or