New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Time Zones

Select an active time zone:
(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
  • today
April 2012
April 2012
SMTWTFS
       
1234567
891011121314
15161718192021
22232425262728
2930     
Monday, April 16, 2012
  • Day
  • Week
  • Month
  • Timeline
all day
test 1
8AM
9AM
10AM
11AM
12PM
1PM
2PM
3PM
4PM
5PM
wee woo waa2
cdfffff
test123xxx
Stylist Appointment
CFS- 646431
this is an APPT.
sssss
ssss
test
aaaaaaaaaa
sfdzgdsdsdsg
fdsfsadfsafs
ssssssssssssssssssss
dfghjkl
aaaaaaaaaaaaaaa
Show 24 hours...
  • Edit
  • Delete
  • New Appointment
  • New Recurring Appointment
  • Go to today
  • Show 24 hours...
RadScheduler allows setting a TimeZoneID property, so users in different parts of the world can see the appointments in their local time. The appointments can be exported with time zone information as well.

This example shows how RadScheduler can be configured to work in different time zones.

As of Q1 2012, the RadScheduler has a more sophisticated support for time zones that allows users to:

  • Save appointments in the RadScheduler default time zone (if no TimeZoneID is set, RadScheduler will use UTC 0)
  • Save appointments in custom time zone (this feature is controlled by the EnableTimeZonesEditing property, which can be found in the AdvancedForm section).

If left unchanged, TimeZoneID, defaults to UTC 0.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" Inherits="Scheduler.Examples.TimeZones.DefaultCS"CodeFile="DefaultCS.aspx.cs"  %>

<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="Stylesheet" type="text/css" href="styles.css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
        <div class="demo-container">
            <div class="bgWrapper">
                <asp:Panel ID="TimeZonePanel" runat="server">
                    <div class="title">
                        Select an active time zone:
                    <telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="TimeZoneDropDown" Width="400" DropDownHeight="400"
                        AutoPostBack="true">
                    </telerik:RadDropDownList>
                    </div>
                </asp:Panel>
                <telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedDate="2012-04-16"
                    DayStartTime="08:00:00" DayEndTime="18:00:00" DataSourceID="AppointmentsDataSource"
                    DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
                    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
                    DataTimeZoneIdField="TimeZoneID" OverflowBehavior="Auto">
                    <AdvancedForm Modal="true" Width="1000" EnableTimeZonesEditing="true"></AdvancedForm>
                    <ResourceTypes>
                        <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID"
                            DataSourceID="RoomsDataSource"></telerik:ResourceType>
                        <telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"
                            DataSourceID="UsersDataSource"></telerik:ResourceType>
                    </ResourceTypes>
                    <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
                    <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
                </telerik:RadScheduler>
            </div>
        </div>
    </telerik:RadAjaxPanel>
    <asp:SqlDataSource ID="AppointmentsDataSource" runat="server" 
        ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
        SelectCommand="SELECT * FROM [Appointments]" InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [RoomID], [UserID], [RecurrenceRule], [RecurrenceParentID], [TimeZoneID]) VALUES (@Subject, @Start, @End , @RoomID, @UserID, @RecurrenceRule, @RecurrenceParentID, @TimeZoneID)"
        UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RoomID] = @RoomID, [UserID] = @UserID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [TimeZoneID] = @TimeZoneID WHERE (ID = @ID)"
        DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @ID">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="Subject" Type="String"></asp:Parameter>
            <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="UserID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
            <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="TimeZoneID" Type="String"></asp:Parameter>
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Subject" Type="String"></asp:Parameter>
            <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="UserID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
            <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="TimeZoneID" Type="String"></asp:Parameter>
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="RoomsDataSource" runat="server" 
        ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
        SelectCommand="SELECT * FROM [Rooms]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="UsersDataSource" runat="server" 
        ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
        SelectCommand="SELECT * FROM [Users]">
    </asp:SqlDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance