Dear,
always i m getting error when i work on Client side Datetimepicker.
very simple criteria. datetpicker1 date become the selected and minimumdate of datepicker2.
WIn7 VS2010 IE8 and telerik 2009 Version Q2 2009 released 08/26/2009
ERROR:
Message: Object doesn't support this property or method
Line: 72
Char: 13
Code: 0
URI: http://localhost:49204/WebSite1/
var DateFrom;
var DateTo;
var RDP1;
var RDP2;
function pageLoad() {
myLabel = document.getElementById("lblNts");
RDP1 = document.getElementById("RadDatePicker1");
RDP2 = document.getElementById("RadDatePicker2");
}
function DateSelected(sender, e) {
var minDate = new Date();
var nMonth;
DateFrom = e.get_newDate().toDateString();
var myFDate = DateFrom.split(" ");
if (myFDate[1] == 'Jan') {
nMonth = '01';
} else if (myFDate[1] == 'Feb') {
nMonth = '02';
} else if (myFDate[1] == 'Mar') {
nMonth = '03';
} else if (myFDate[1] == 'Apr') {
nMonth = '04';
} else if (myFDate[1] == 'May') {
nMonth = '05';
} else if (myFDate[1] == 'Jun') {
nMonth = '06';
} else if (myFDate[1] == 'Jul') {
nMonth = '07';
} else if (myFDate[1] == 'Aug') {
nMonth = '08';
} else if (myFDate[1] == 'Sep') {
nMonth = '09';
} else if (myFDate[1] == 'Oct') {
nMonth = '10';
} else if (myFDate[1] == 'Nov') {
nMonth = '11';
} else if (myFDate[1] == 'Dec') {
nMonth = '12';
} else {
nMonth = 'NA';
}
minDate.setFullYear(myFDate[3], nMonth - 1, myFDate[2]);
RDP2.set_selectedDate(minDate);
}
<telerik:RadDatePicker ID="RadDatePicker1" Runat="server" MinDate="<%#DateTime.Now %>">
<ClientEvents OnDateSelected="DateSelected" />
<DateInput DateFormat="dd-MM-yyyy"></DateInput>
</telerik:RadDatePicker>
| <telerik:RadScheduler ID="scheduler" runat="server" Width="100%" Height="80%" Skin="Office2007" |
| DataKeyField="Name" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" |
| ShowFooter="false" MinutesPerRow="15" TimeLabelRowSpan="4" RowHeaderWidth="40px" |
| ShowFullTime="true" OverflowBehavior="Scroll" ShowAllDayRow="false" Font-Names="Segoe UI" |
| Font-Size="12px" GroupBy="Provider" GroupingDirection="Horizontal" HoursPanelTimeFormat="h ttt" |
| MinimumInlineFormHeight="180" MinimumInlineFormWidth="250" OnAppointmentCreated="OnAppointmentCreated" |
| OnAppointmentCommand="OnAppointmentCommand" OnFormCreated="OnFormCreated" OnFormCreating="OnFormCreating"> |
| <InlineInsertTemplate> |
| <fieldset> |
| <table> |
| <tr> |
| <td><label>Subject</label> </td> |
| <td> |
| <asp:TextBox ID="txtSubject" runat="server" Width="160px" Height="50px" /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>Type</label> </td> |
| <td> |
| <asp:DropDownList ID="ddlType" runat="server" Width="160px" /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>Start</label> </td> |
| <td> |
| <telerik:RadDateTimePicker ID="tpStartTime" runat="server" Width="160px" Skin="Office2007" /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>End</label> </td> |
| <td> |
| <telerik:RadDateTimePicker ID="tpEndTime" runat="server" Width="160px" Skin="Office2007" /> |
| </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td align="right"> |
| <table> |
| <tr> |
| <td> |
| <asp:Button ID="btnSave" Text="Save" runat="server" CommandName="Insert" /> |
| </td> |
| <td> |
| <asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </fieldset> |
| </InlineInsertTemplate> |
| <InlineEditTemplate> |
| <fieldset> |
| <table> |
| <tr> |
| <td><label>Subject</label> </td> |
| <td> |
| <asp:TextBox ID="txtSubject" runat="server" Width="160px" Height="50px" Text='<%# Bind("Subject") %>' /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>Type</label> </td> |
| <td> |
| <asp:DropDownList ID="ddlType" runat="server" Width="160px" /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>Date</label> </td> |
| <td> |
| <telerik:RadDateTimePicker ID="dpStartDate" runat="server" Width="160px" Skin="Office2007" /> |
| </td> |
| </tr> |
| <tr> |
| <td><label>End Date</label> </td> |
| <td> |
| <telerik:RadDateTimePicker ID="dpEndDate" runat="server" Width="160px" Skin="Office2007" /> |
| </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td align="right"> |
| <table> |
| <tr> |
| <td> |
| <asp:Button ID="btnUpdate" Text="Save" runat="server" CommandName="Update" /> |
| </td> |
| <td> |
| <asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </fieldset> |
| </InlineEditTemplate> |
| <AppointmentTemplate> |
| <br /> |
| <%# Eval( "Subject" )%> |
| <br /> |
| <asp:Label runat="server" ID="lblType" /> |
| </AppointmentTemplate> |
| <TimelineView UserSelectable="false" /> |
| <TimeSlotContextMenuSettings EnableDefault="true" Skin="Office2007" /> |
| <AppointmentContextMenuSettings EnableDefault="true" Skin="Office2007" /> |
| </telerik:RadScheduler> |
| protected void Page_Load( object sender, EventArgs e ) |
| { |
| if( !IsPostBack ) |
| { |
| ResourceType resType = new ResourceType( "Provider" ); |
| resType.ForeignKeyField = "ProviderID"; |
| resType.TextField = "FullName"; |
| resType.KeyField = "ProviderId"; |
| resType.DataSource = providerList; // A list of providers with name and Id |
| scheduler.ResourceTypes.Add( resType ); |
| } |
| } |
| protected void OnAppointmentCreated( object sender, AppointmentCreatedEventArgs e ) |
| { |
| } |
| protected void OnAppointmentCommand( object sender, AppointmentCommandEventArgs e ) |
| { |
| appointmentData = new DTO.AppointmentData(); // User defined Class to store appointment |
| appointmentData.HospitalId = 1; |
| appointmentData.CreatedBy = 9; |
| appointmentData.Date = scheduler.SelectedDate; |
| appointmentData.ProviderID = Convert.ToUInt32( e.Container.Appointment.Resources.GetResourceByType( "Provider" ).Key.ToString() ); |
| TextBox reason = (TextBox) e.Container.FindControl( "txtSubject" ); |
| appointmentData.VisitReason = reason.Text.Trim(); |
| RadDateTimePicker startTime = (RadDateTimePicker) e.Container.FindControl( "tpStartTime" ); |
| appointmentData.StartTime = Convert.ToDateTime( startTime.SelectedDate ); |
| RadDateTimePicker endTime = (RadDateTimePicker) e.Container.FindControl( "tpEndTime" ); |
| appointmentData.EndTime = Convert.ToDateTime( endTime.SelectedDate ); |
| DropDownList type = (DropDownList) e.Container.FindControl( "ddlType" ); |
| appointmentData.AppointmentType = type.SelectedValue; |
| BookAppointment( appointmentData ); |
| protected void OnFormCreated( object sender, SchedulerFormCreatedEventArgs e ) |
| { |
| if( e.Container.Mode == SchedulerFormMode.Insert ) |
| { |
| RadDateTimePicker startInput = (RadDateTimePicker) e.Container.FindControl( "tpStartTime" ); |
| startInput.SelectedDate = DateTime.Now; |
| RadDateTimePicker endInput = (RadDateTimePicker) e.Container.FindControl( "tpEndTime" ); |
| endInput.SelectedDate = DateTime.Now.AddMinutes( 30 ); |
| DropDownList type = (DropDownList) e.Container.FindControl( "ddlType" ); |
| type.DataTextField = "Name"; |
| type.DataValueField = "ConsultationDuration"; |
| type.DataSource = GetAllAppointmentTypes(); // Returns a list of appointments |
| type.DataBind(); |
| } |
| } |
| protected void OnFormCreating( object sender, SchedulerFormCreatingEventArgs e ) |
| { |
| } |
| protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) |
| { |
| AddMsg(HiddenMsg.Value); |
| } |
| protected void RadRotator1_Load(object sender, EventArgs e) |
| { |
| AddMsg(HiddenMsg.Value); |
| } |
| function SuccessHandler(message) { |
| try |
| { |
| var hidden = document.getElementById("<%=HiddenMsg.ClientID %>"); |
| hidden.value= message; |
| ajaxManager.ajaxRequestWithTarget("<%=RadRotator1.UniqueID %>",''); |
| //ajaxManager.ajaxRequest(message); |
| } |
| catch (e) |
| { |
| } |
| } |
Me
.rgJobPlans.MasterTableView.CommandItemSettings.AddNewRecordText = "Add New Template"
Hi,
I am able to use the Paste Context Menu only if the items are copied from the RadFile Explorer.
What do I need to do if I want to paste items into the RadFile Explorer window that are copied outside from the File Explorer(i.e., from my desktop or something...)?
