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

Calendar showing 1 day less

1 Answer 128 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sangeeta
Top achievements
Rank 1
Sangeeta asked on 18 Dec 2014, 12:35 PM
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>

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 23 Dec 2014, 11:50 AM
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.

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