Calendar showing 1 day less

2 posts, 0 answers
  1. Sangeeta
    Sangeeta avatar
    8 posts
    Member since:
    Dec 2014

    Posted 18 Dec 2014 Link to this post

    Hello,
             I used the Rad Scheduler For selection of Etc Date in calendar. Example - If "Phase Start Date" is 2014-11-28 and "Phase End Date" is 2014-12-04 in "Development" then in Calender should show the Selection (11/28) to (12/04). But In my application, show the selection 1 day less in calendar. Means selection show (11/28) to (12/03) in Calender, It is wrong. But My database is correct. Its get correct data  like Phase_Start_Date = 2014-11-28 12:00:00.000 and Phase_End_Date = 2014-12-04 12:00:00.000.
             So I don't know why its show the 1 less day selection in calendar. Attach the screen shot of Database and Application. Please see it.

    I using Rad Scheduler coding like-

     <telerik:RadScheduler runat="server" ID="rscCalender" GroupBy="ProjectID" GroupingDirection="Vertical" 
                AppointmentStyleMode="Default" DataSourceID="EventsDataSource" DataKeyField="ProjectID" Width=" "  CssClass="rshcCalender"
                DataSubjectField="Stage" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"  ShowFullTime="false" 
                DataStartField="Phase_Start_Date" DataEndField="Phase_End_Date" ShowAllDayRow="true" WeekView-ShowAllDayInsertArea="false" WeekView-ShowHoursColumn="false" WeekView-DayStartTime="9:00:00" WeekView-DayEndTime="9:00:00" 
                SelectedView="WeekView" thView-ReadOnly="true" DayView-ReadOnly="true" TimelineView-ReadOnly="true" TimelineView-UserSelectable="false"
                OnResourceHeaderCreated="rscCalender_ResourceHeaderCreated" AllowDelete="false" AllowEdit="false" AllowInsert="false" OverflowBehavior="Scroll">

                <WeekView ColumnHeaderDateFormat="ddd(M/d)"  HeaderDateFormat="MM/dd" />
          
                <AdvancedForm Modal="false"></AdvancedForm>
               
                <ResourceHeaderTemplate >
                    <asp:Panel ID="ResourceImageWrapper" runat="server">               
                        <asp:LinkButton ID="lnkProjectName" runat="server" ></asp:LinkButton>
                    </asp:Panel>
                </ResourceHeaderTemplate>
                <ResourceTypes>
                    <telerik:ResourceType KeyField="ProjectIDs" Name="ProjectID" TextField="ProjectName" ForeignKeyField="ProjectIDs"
                     DataSourceID="ProjectSource"  ></telerik:ResourceType>
                </ResourceTypes>
              <DayView  UserSelectable="false"/>
        <MonthView  UserSelectable="false"/>
        <TimelineView  UserSelectable="false"/>
            </telerik:RadScheduler>

             <asp:ObjectDataSource ID="EventsDataSource" runat="server" SelectMethod="GetETCDates" TypeName="ProjectTrakObjects.DO_GetData">
                   <SelectParameters>
                    <asp:Parameter Name="ProjectID"   Type="Int32" DefaultValue="0" />
                </SelectParameters>
                    </asp:ObjectDataSource>
               <asp:ObjectDataSource ID="ProjectSource" runat="server" SelectMethod="GetCalanderProjects" TypeName="ProjectTrakObjects.DO_GetData">
                   <SelectParameters>
                    <asp:Parameter Name="ProjectID"   Type="Int32" DefaultValue="0" />
                </SelectParameters>
                    </asp:ObjectDataSource>
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 23 Dec 2014 Link to this post

    Hello,

    I would like to clarify that this is expected behavior since the Phase End Date is  2014-12-04 12:00:00 AM. The 12:00:00 AM means that the appointment will include the entire 3rd of December but not 4th of December. The end date ( DateTime object includes time as well) shows the appointment final moment. So the appointment will end once it is already 4th of December and it will not continue on 4th of December.

    In order to achieve this functionality you have to set the Phase End Date to be 2014-12-05 12:00:00 AM.


    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top