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

FirstDayOfWeek not affecting VisibleRangeStart in MonthView

3 Answers 33 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 1
Danny asked on 31 May 2013, 03:09 PM
Hi,
We have a RadScheduler instance with a user option to show or hide weekends. Server-Side
we then set FirstDayOfWeek and LastDayOfWeek for the scheduler. The issue is in
MonthView. When we have the week set to Monday through Friday, we would like the
scheduler to not show rows if the only visible days would be from another month. For
example:  June 2013 starts on a Saturday and ends on a Sunday, so we would like to have
only the weeks of June 3, 10, 17 & 24 showing. However, the scheduler also shows the week
of May 27.

Specifically, when on MonthView for June 2013 and showing weekends VisibleRangeStart is
5/26/2013 and VisibleRangeEnd is 7/7/2013 and six rows show. However, when not showing
weekends VisibleRangeStart is 5/27/2013 and VisibleRangeEnd is 6/29/2013 and five rows
show. What we want in this scenario is VisibleRangeStart to be 6/3/2013 and
VisibleRangeEnd to be 6/29/2013 with four rows showing. Particularly odd is that the
VisibleRangeEnd seems to be working as desired while VisibleRangeStart does not.

Unfortunately, VisibleRangeStart and VisibleRangeEnd are get only properties.

Is there any way I can make the scheduler remove that undesired row?

Thanks,
Danny

3 Answers, 1 is accepted

Sort by
0
Accepted
Nencho
Telerik team
answered on 05 Jun 2013, 12:28 PM
Hello Danny,

You could use the .rsFirstRow or the .rsLastRow css selectors and apply the  display:none;  style, in order to hide accordingly the first or the last row. With this css rules all timeslots on the corresponding row would not be displayed.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Danny
Top achievements
Rank 1
answered on 05 Jun 2013, 05:38 PM
Nencho,
Thanks. That worked. We implemented it like this:
If rsCalendar.SelectedView = SchedulerViewType.MonthView And dtStartDate.AddDays(7).Day < 4 And Not .bShowWeekends Then
    dtStartDate = dtStartDate.AddDays(7)
    Dim s As String
    s = "<style>"
    s += String.Format("#{0} .rsFirstRow {{ display: none; }}", rsCalendar.ClientID)
    s += "</style>"
    litCalendarStyle.Text = s
Else
    litCalendarStyle.Text = String.Empty
End If

Danny
0
Nencho
Telerik team
answered on 10 Jun 2013, 07:01 AM
Hi Danny,

Thank you for sharing your solution with the community.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Danny
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Danny
Top achievements
Rank 1
Share this question
or