<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadSchedulerWebForm.aspx.cs" Inherits="RadSchedulerWebForm" %>

<%@ Register Namespace="Telerik.Web.UI.Debug" TagPrefix="debug" %>
<%@ Register Assembly="Telerik.Web.UI" TagPrefix="telerik" Namespace="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />

</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>

        <script type="text/javascript">

            (function () {
                var timePerMinute = 60000,
	                $T = Telerik.Web.UI,
	                $TS = $T.Scheduler;

                $TS.Rendering.RenderingManagerBase.prototype._toClientDate = function (serverDate) {
                    var date;

                    if (serverDate.getTime) {
                        date = new Date(serverDate.getTime());
                    } else {
                        date = new Date(serverDate);
                    }

                    // The server date is treated as local, but is in fact UTC.
                    // We need to compensate for this by adding the client time zone offset.
                    var tzOffset = date.getTimezoneOffset() * timePerMinute;
                    date.setTime(date.getTime() + tzOffset);

                    // Convert it to client time by adding the scheduler time zone offset.
                    date.setTime(date.getTime() + this._schedulerTzOffset);

                    return date;

                };

            })();


        </script>

        <telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="WeekView">
            <WebServiceSettings Path="api/appointments" />
        </telerik:RadScheduler>
    </form>
</body>
</html>
