Sanjeev Bora
Top achievements
Rank 1
Sanjeev Bora
asked on 07 May 2011, 07:12 PM
Hi,
I was trying to use Client side script as suggested from here
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/opening-the-new-appointment-form-and-pre-populating-fields.aspx
to open a new Appointment by clicking as button. However I get the Javascript error as follows ..
Uncaught TypeError: Cannot call method 'getTimezoneOffset' of null
I am able to create "New appointment" from the context menu of the Scheduler control. But not from a button outside. Please suggest.
Thanks
Sanjeev
I was trying to use Client side script as suggested from here
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/opening-the-new-appointment-form-and-pre-populating-fields.aspx
to open a new Appointment by clicking as button. However I get the Javascript error as follows ..
Uncaught TypeError: Cannot call method 'getTimezoneOffset' of null
I am able to create "New appointment" from the context menu of the Scheduler control. But not from a button outside. Please suggest.
Thanks
Sanjeev
5 Answers, 1 is accepted
0
Hi Sanjeev Bora,
I am able to create new appointment via button-click without receiving any Javascript error. Please take a look at the video that I made for you to show you what I got as a result on my side.
Could you please show me the settings of your RadScheduler please?
Regards,
Veronica Milcheva
the Telerik team
I am able to create new appointment via button-click without receiving any Javascript error. Please take a look at the video that I made for you to show you what I got as a result on my side.
Could you please show me the settings of your RadScheduler please?
Regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Sanjeev Bora
Top achievements
Rank 1
answered on 10 May 2011, 02:30 AM
Hi Veronica,
Here is the RadScheduler Block.
Here is the RadScheduler Block.
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
AppointmentStyleMode
=
"Simple"
AdvancedForm-Enabled
=
"true"
AdvancedForm-Modal
=
"true"
AllowDelete
=
"true"
AllowEdit
=
"true"
AllowInsert
=
"true"
DataDescriptionField
=
"DESCRIPTION"
DataEndField
=
"TO_DATE"
DataKeyField
=
"EVENTID"
DataStartField
=
"FRM_DATE"
DataSubjectFielD
=
"SUMMARY"
DisplayDeleteConfirmation
=
"true"
EnableAdvancedForm
=
"true"
EnableDescriptionField
=
"true"
EnableRecurrenceSupport
=
"true"
EnableEmbeddedScripts
=
"true"
Localization-ContextMenuAddAppointment
=
"Add event"
Localization-ContextMenuAddRecurringAppointment
=
"Add recurring event"
EnableExactTimeRendering
=
"true"
DataRecurrenceField
=
"RECURRENCE_RULE"
DataRecurrenceParentKeyField
=
"RECURRENCE_PID"
RegisterWithScriptManager
=
"true"
StartEditingInAdvancedForm
=
"true"
StartInsertingInAdvancedForm
=
"true"
TimeSlotContextMenuSettings-EnableDefault
=
"True"
SelectedView
=
"MonthView"
Skin
=
"Forest"
DataSourceID
=
"datasource1"
OverflowBehavior
=
"Expand"
WorkDayStartTime
=
"08:00"
WorkDayEndTime
=
"18:00"
MinutesPerRow
=
"30"
HoursPanelTimeFormat
=
"HH:mm tt"
OnFormCreated
=
"RadScheduler1_FormCreated"
OnClientAppointmentContextMenuItemClicked
=
"appointmentContextMenuItemClicked"
>
<
AppointmentContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"SchedulerAppointmentContextMenu"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Open"
Value
=
"CommandEdit"
/>
<
telerik:RadMenuItem
Text
=
"Manage alerts"
/>
<
telerik:RadMenuItem
IsSeparator
=
"True"
/>
<
telerik:RadMenuItem
Text
=
"Delete"
Value
=
"CommandDelete"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
AppointmentContextMenus
>
<
ResourceTypes
>
<
telerik:ResourceType
KeyField
=
"CATID"
Name
=
"Category"
TextField
=
"Category"
ForeignKeyField
=
"CATEGORY_ID"
DataSourceID
=
"catdatasource"
/>
</
ResourceTypes
>
<
TimeSlotContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"SchedulerTimeSlotContextMenu"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"New Event"
Value
=
"CommandAddAppointment"
/>
<
telerik:RadMenuItem
Text
=
"New Recurring Event"
Value
=
"CommandAddRecurringAppointment"
/>
<
telerik:RadMenuItem
IsSeparator
=
"true"
/>
<
telerik:RadMenuItem
Text
=
"Go to today"
Value
=
"CommandGoToToday"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
TimeSlotContextMenus
>
</
telerik:RadScheduler
>
0
Sanjeev Bora
Top achievements
Rank 1
answered on 10 May 2011, 06:30 PM
Please help us out, a little critical here.
Thanks
Sanjeev
Thanks
Sanjeev
0
Hello Sanjeev Bora,
Thank you for the RadScheduler settings provided.
The problem was because you set the selected view of the RadScheduler to "MonthView". Please note that when you create appointments in "MonthView" and "TimelineView" they will be always all-day appointments. Instead of using the showAllDayInlineInsertForm in the button click handler you can use the showAdvancedInsertForm:
Please test it and let me know how it goes.
Kind regards,
Veronica Milcheva
the Telerik team
Thank you for the RadScheduler settings provided.
The problem was because you set the selected view of the RadScheduler to "MonthView". Please note that when you create appointments in "MonthView" and "TimelineView" they will be always all-day appointments. Instead of using the showAllDayInlineInsertForm in the button click handler you can use the showAdvancedInsertForm:
function
insertAppointment() {
var
now =
new
Date();
var
scheduler = $find(
"<%= RadScheduler1.ClientID %>"
);
scheduler.showAdvancedInsertForm(now);
}
Please test it and let me know how it goes.
Kind regards,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Sanjeev Bora
Top achievements
Rank 1
answered on 11 May 2011, 06:23 PM
Perfect! it worked...
Thanks very much
Sanjeev
Thanks very much
Sanjeev