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

[Solved] How to Convert RadScheduler start Format to edit an Appointment in New RadWindow

5 Answers 288 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Avinash
Top achievements
Rank 1
Avinash asked on 16 Mar 2009, 04:57 AM
I am Using  Telerik V2008.3 1314 .
I am Using Radwindow to edit or Create an Appointment. But i have Problems with the start time Query Parameter.

The javascript on radscheduler is 
var start = formatDate(eventArgs.get_startTime());
for the above, i am getting the start time as 200903160200 where as my PC time is 12:52 pm

So how to get the exact time as clicked on the scheduler and convert to DateTime Object at serverside.?


5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 18 Mar 2009, 11:57 AM
Hello Avinash,

You should call the format method of the start time object:
function OnClientAppointmentInserting(sender, eventArgs)   
        {  
            //Using the format() method creates a string from the start time object  
            //which can be parsed on the server with:  
            //DateTime start = DateTime.Parse(startTimeString);         
            var start = eventArgs.get_startTime().format("yyyy/MM/dd hh:mm")  
        } 

Let us know how it goes.

Best wishes,
Peter
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Avinash
Top achievements
Rank 1
answered on 24 Mar 2009, 11:02 AM
It was resolved on the next day.
I did the formatting of date param but the problem is The StartTime Query param is in UTC format.And i confused by comparing with the system time instead of the appointment time.

Thanks for the reply.
0
bad nick
Top achievements
Rank 1
answered on 17 Jun 2009, 01:43 PM
Hi Avinash.
The correct format s/b this:

format("yyyy/MM/dd HH:mm"

this will turn 2PMin 14:00, yours would return 2:00 for 2pm and 2am
0
Raj
Top achievements
Rank 1
answered on 11 Jan 2010, 01:57 PM
We are migrating from Q1 2008 to Q3 2009 version.
Before migration i am getting proper value in "eventArgs.get_startTime().format("yyyy/MM/dd hh:mm");"

If i had clicked on 12:00AM i am gtting proepr answer 2010/01/11 12:00. But now after migartion if i clicked on 12:00Am in scheduler control i am getting 2010/01/11 08:00.
I am getting always 8:00 hours difference. Time zone i had set is EST.

Before formating the get_startTime() i am getting
Mon Jan 11 08:00:00 EST 2010 and after formating 2010/01/11 08:00. But as mentioned i clicked on 12:00 To 12:30 Slot and i am getting 8:00 to 8:30 slot
Please let me know if i have to set any other proeprty.
Below mentioned is my settings for RadScheduler

<

telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Outlook" ShowNavigationPane="true"

DayStartTime="00:00:00" DayEndTime="23:59:59" EnableEmbeddedSkins="true" ShowResourceHeaders="true"

StartEditingInAdvancedForm="false" SelectedView="DayView" ShowHeader="true" ShowViewTabs="true"

ShowFooter="false" DataKeyField="CalendarID" DataSubjectField="Subject" ShowHoursColumn="true"

OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" CustomAttributeNames="InternalInvitees,Organizer,MeetingSubType,MeetingType,Location,SourceApp,OrganizerUser,InternalInviteeIDs"

OnClientAppointmentInserting="OnClientAppointmentInserting" ShowAllDayRow="true"

OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnClientAppointmentMoveStart="onClientAppointmentMoveStart"

OnClientAppointmentResizeStart="onClientAppointmentResizeStart" DataStartField="StartDate"

DataEndField="EndDate" OnClientAppointmentEditing="OnClientAppointmentDoubleClick">

<DayView WorkDayStartTime="09:00:00" WorkDayEndTime="17:00:00" />

</telerik:RadScheduler>

0
Peter
Telerik team
answered on 14 Jan 2010, 08:11 AM
Hi Raj,

This problem occurs because you set DayStartTime="00:00:00" and DayEndTime="23:59:59". Please, set ShowFullTime="true" instead.


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
Avinash
Top achievements
Rank 1
Answers by
Peter
Telerik team
Avinash
Top achievements
Rank 1
bad nick
Top achievements
Rank 1
Raj
Top achievements
Rank 1
Share this question
or