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

VisibleRangeEnd in week view

6 Answers 85 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 24 Oct 2011, 10:31 AM
Hi,
    When in week view the VisibleRangeStart date shows as a Monday (24/10/2011) which is expected but the VisibleRangeEnd also shows as a Monday (31/10/2011) which I would expect it to show as a Sunday (30/10/2011). I have only tried this in the latest 2011 Q2 SP1 build so I'm not sure if this is by design or a bug. I have FirstDayOfWeek set to Monday and LastDayOfWeek set to Sunday.

The screen shows Monday - Sunday so can not understand why VisibleRangeEnd property would be different.

Is this a bug or do I have my setings wrong?
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" Height="100%"
    OnDataBound="RadScheduler1_DataBound" AppointmentStyleMode="Default" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
    OnNavigationComplete="RadScheduler1_OnNavigationComplete" OnClientFormCreated="schedulerFormCreated"
    CustomAttributeNames="AppointmentColor" StartInsertingInAdvancedForm="true" EnableDescriptionField="true"
    DayView-EnableExactTimeRendering="True" ShowFooter="False" GroupBy="Room" DayEndTime="21:00:00"
    WorkDayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" Culture="en-GB"
    DayView-HeaderDateFormat="dddd, MMMM dd, yyyy">
    <AdvancedForm Modal="true" />
    <Reminders Enabled="true" />
    <AppointmentTemplate>
        <div class="rsAptSubject">
            <%# Eval("Subject") %>
        </div>
        <%# Eval("Description") %>
    </AppointmentTemplate>
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
            AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
            RoomID='<%# Bind("Room") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
            AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
            RoomID='<%# Bind("Room") %>' />
    </AdvancedInsertTemplate>
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <DayView EnableExactTimeRendering="True"></DayView>
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

6 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 24 Oct 2011, 01:22 PM
Hi,
    If I set ShowAllDayRow="False" then the VisibleRangeEnd date on week view will be Sunday as I expect. So having ShowAllDayRow set to true causes the VisibleRangeEnd date to be Monday.

Luckly I don't need to show all day row so it sorts it for me but could you confirm if this is a bug?

Thanks
0
Peter
Telerik team
answered on 27 Oct 2011, 10:51 AM
Hi Paul,

This is not a bug. We have had this issue reported before and we had an internal discussion what should be the correct behavior. All-ay appointments actually end at 00:00 on the next day, so it is expected that the visible range end should be one day ahead.

Anyway, thank you for raising this question and your feedback.

Kind regards, Peter
the Telerik team
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
Paul
Top achievements
Rank 1
answered on 27 Oct 2011, 11:51 AM
I understand the logic for processing behind the scenes it would have to be calculated like that, but as the property suggests Returns visible end date of current view. The keyword being visible, As you can not see Monday then it makes no sence to make the end date Monday.

If it has to stay the way it is now could I suggest that you updated the property summary text that states the behavior changes if AllDay is set.


Thanks
0
Peter
Telerik team
answered on 31 Oct 2011, 05:42 PM
Hello Paul,

Thank you for your feedback and recommendation. We will consider it.

All the best, Peter
the Telerik team
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
Prava kafle
Top achievements
Rank 1
answered on 01 Jul 2012, 09:03 PM
Can I manipulate what is displayed in dateHeader for week view.  If yes, how do I do that on server side?

  Each time slot in my week view is set to 1440minutes  for a 24 hour time period.  I have a slightly different issue than the earlier posts. Calender displays week view properly  by showing appointments from Monday to Friday. 
However,  date header in  week calendar view shows  a time range of 6 days.
I just want to  customize  what is displayed in date header. 


public void SetSchedulerToWeekView(RadScheduler rsTicketsSchedule)
        {
           
                rsTicketsSchedule.RowHeight = 40;
                rsTicketsSchedule.MinutesPerRow = 1440;
                rsTicketsSchedule.TimeLabelRowSpan = 1;


                rsTicketsSchedule.ShowFooter = false;
                rsTicketsSchedule.ShowAllDayRow = false;
                rsTicketsSchedule.EnableExactTimeRendering = false;
                rsTicketsSchedule.WeekView.ShowHoursColumn = false;


                rsTicketsSchedule.FirstDayOfWeek = DayOfWeek.Monday;
                rsTicketsSchedule.LastDayOfWeek = DayOfWeek.Friday;


                rsTicketsSchedule.NumberOfHoveredRows = 1;
                rsTicketsSchedule.ShowFullTime = false;
                
            
        }


Thanks,
Prava
0
Peter
Telerik team
answered on 04 Jul 2012, 11:13 AM
Hi Prava,

There is no Header template, but you can use the HeaderDateFormat property. For example -

<WeekView HeaderDateFormat="dddd - 'custom text'" />

For a complete list of supported values, please refer to this msdn topic - Custom Date and Time Format Strings

Another way to modify the date header is through jQuery:
<script type="text/javascript">
       function pageLoad() {
           var $ = $telerik.$;
           $(".rsHeader h2").text("test");
       }
   </script>



Greetings,
Peter
the Telerik team
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.
Tags
Scheduler
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Peter
Telerik team
Prava kafle
Top achievements
Rank 1
Share this question
or