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

Night hours

8 Answers 148 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
TT
Top achievements
Rank 1
TT asked on 09 Jan 2013, 04:14 PM
Hi, there is a way to hide the hours in the scheduler, from for example 11 pm to 7 am? i want show only the day

Thanks

8 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Jan 2013, 03:45 AM
Hi Mattia,

One suggestion is that you can set the WorkDayStartTime and WorkDayEndTime and specify the NumberOfSlots in the TimelineView as follows.

ASPX:
<telerik:RadScheduler ID="RadScheduler1" runat="server"  WorkDayStartTime="07:00:00" WorkDayEndTime="23:00:00" ............ >
     <TimelineView SlotDuration="01:00" NumberOfSlots="17" ColumnHeaderDateFormat="hh:mm"/>
</telerik:RadScheduler>

Hope this helps.

Regards,
Princy.
0
TT
Top achievements
Rank 1
answered on 10 Jan 2013, 08:37 AM
I tried but it doesn't work.

<telerik:RadScheduler ID="RadScheduler1" runat="server"  WorkDayStartTime="8:30:00" WorkDayEndTime="19:30">
...
....
 <TimelineView GroupBy="Room" NumberOfSlots="24" ColumnHeaderDateFormat="t" GroupingDirection="Vertical"
                    StartTime="08:00:00" ShowInsertArea="false" TimeLabelSpan="1"  SlotDuration="00:30:00" />

it shows all hours. I want to show hours from 8.30 am to 7.30 pm (i'm using italian format)
0
Princy
Top achievements
Rank 2
answered on 14 Jan 2013, 06:22 AM
Hi,

Try setting the SelectedDate as follows to achieve your scenario.

ASPX:
<telerik:RadScheduler ID="RadScheduler1" runat="server"  SelectedDate="2013-01-14 08:30:00" WorkDayStartTime="08:30:00" WorkDayEndTime="19:30:00" ............. >
   <TimelineView ColumnHeaderDateFormat="t" GroupingDirection="Vertical" NumberOfSlots="23"  ShowInsertArea="false" TimeLabelSpan="1"  SlotDuration="00:30:00"  />
</telerik:RadScheduler>

Hope this helps.

Regards,
Princy.
0
TT
Top achievements
Rank 1
answered on 15 Jan 2013, 04:46 PM
it's doesn't works
here my code:


      <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Windows7" SelectedView="TimelineView"
                Culture="it-IT" DayStartTime="08:00:00" OnFormCreating="RadScheduler1_FormCreating"
                Reminders-Enabled="false" FirstDayOfWeek="Monday" Height="100%" DataSourceID="SqlDataSource1"
                WorkDayStartTime="08:00" CssClass="rsCategoryRed" RowHeaderWidth="70px" DataEndField="Fine"
                DataKeyField="ID" DataStartField="Start" DataSubjectField="Subject" DataDescriptionField="Description"
                OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" DataReminderField="RecurrenceRule"
                EnableDescriptionField="True" OnAppointmentClick="RadScheduler1_OnAppointmentClick"
                OnClientAppointmentClick="OnClientAppointmentClick" OnClientTimeSlotClick="OnClientTimeSlotClick"
                WorkDayEndTime="19:30" RowHeight="90px" EnableExactTimeRendering="True" DayView-WorkDayEndTime="19:30"
                DayView-WorkDayStartTime="08:00" AdvancedForm-EnableCustomAttributeEditing="true"
                CustomAttributeNames="Terapista" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                OnAppointmentContextMenuItemClicked="RadScheduler1_OnAppointmentContextMenuItemClicked"
                OnNavigationCommand="RadScheduler1_NavigationCommand" SelectedDate="2013-01-16 08:30:00"
                Localization-AdvancedEditAppointment="Modifica appuntamento" Localization-ConfirmDeleteText="Sicuro di eliminare l'appuntamento?"
                Localization-ConfirmDeleteTitle="Eliminazione" Localization-HeaderToday="Oggi"
                OnAppointmentUpdate="RadScheduler1_OnAppointmentUpdate" Localization-AdvancedCalendarCancel="Annulla"
                Localization-AdvancedCalendarToday="Oggi" Localization-AdvancedClose="Chiudi"
                Localization-AdvancedDescription="Descrizione" Localization-AdvancedDone="Fatto"
                Localization-AdvancedNewAppointment="Nuovo appuntamento" Localization-ContextMenuDelete="Elimina"
                Localization-ContextMenuEdit="Modifica" Localization-ContextMenuGoToToday="Vai a oggi"
                Localization-Save="Salva" Localization-ConfirmCancel="Annulla" Localization-ContextMenuAddAppointment="Nuovo appuntamento"
                DayEndTime="19:30" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"
                ShowAllDayRow="False" Localization-HeaderDay="Gionaliero" Localization-HeaderMonth="Mese"
                BorderColor="#FFE6BF" AdvancedForm-Enabled="False" StartEditingInAdvancedForm="false">
                <AdvancedForm Modal="true" />
                <Localization AdvancedCalendarCancel="Annulla" AdvancedCalendarToday="Oggi" AdvancedClose="Chiudi"
                    AdvancedDescription="Descrizione" AdvancedDone="Fatto" AdvancedEditAppointment="Modifica appuntamento"
                    AdvancedNewAppointment="Nuovo appuntamento" ConfirmCancel="Annulla" ConfirmDeleteText="Sicuro di eliminare l'appuntamento?"
                    ConfirmDeleteTitle="Eliminazione" ContextMenuAddAppointment="Nuovo appuntamento"
                    ContextMenuDelete="Elimina" ContextMenuEdit="Modifica" ContextMenuGoToToday="Vai a oggi"
                    HeaderToday="Oggi" Save="Salva" HeaderDay="Giornaliero" HeaderWeek="Settimana" />
                <ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
                    <Pdf PageTitle="Schedule" Author="" Creator="" Title="Schedule" />
                </ExportSettings>
                <TimelineView GroupBy="Room" NumberOfSlots="24" ColumnHeaderDateFormat="t" GroupingDirection="Vertical"
                    StartTime="08:00" ShowInsertArea="false" TimeLabelSpan="1" SlotDuration="00:30:00" />
                <ResourceTypes>
                    <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID"
                        DataSourceID="RoomsDataSource" />
                </ResourceTypes>
               
                <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server">
                        ... </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
                <AppointmentTemplate>....</AppointmentTemplate>
            </telerik:RadScheduler>

i want to show hours from 8.00 am to 7.30 pm
0
Boyan Dimitrov
Telerik team
answered on 18 Jan 2013, 03:59 PM
Hello,

Please set the RadScheduler SelectedDate property to а date property and this will avoid that issue:
//markup code
<telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedDate="2013-01-16" ...........>
 ..........    
         <TimelineView GroupBy="Room" NumberOfSlots="24" ColumnHeaderDateFormat="t"  GroupingDirection="Vertical"
                    StartTime="08:00" ShowInsertArea="false"  SlotDuration="00:30:00" />    
    </telerik:RadScheduler>

Please find attached a sample image demonstrating the application behavior at my side.

Regards,
Boyan Dimitrov
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
TT
Top achievements
Rank 1
answered on 18 Jan 2013, 04:35 PM
ok i have the same view..but when you press the right arrow to move in the day it will show the hours from 20.00 to 7.30 am 
and I don't want it..it's possible to move till the next day at 08.00 am?
0
Accepted
Boyan Dimitrov
Telerik team
answered on 23 Jan 2013, 03:54 PM
Hello,

An easy and convenient way of achieving that functionality would be to provide a custom handler for clicking on the right arrow if you are currently in RadScheduler TimelineView. You can cancel the default behavior and add custom logic that will fit your requirement as shown in the code snippet below:
//markup code

<telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Windows7" .....
OnNavigationCommand="RadScheduler1_NavigationCommand">
....
</telerik:RadScheduler>
//code behind
protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
{
    if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod && RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
    {
        e.Cancel = true;
        RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddDays(1);
        RadScheduler1.TimelineView.StartTime = new TimeSpan(8, 0, 0);
    }
}

Regards,
Boyan Dimitrov
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
TT
Top achievements
Rank 1
answered on 23 Jan 2013, 04:10 PM
thanks..it's works!

Tags
Scheduler
Asked by
TT
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
TT
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or