Disable Built In Validation

2 posts, 0 answers
  1. Venky
    Venky avatar
    14 posts
    Member since:
    Feb 2007

    Posted 27 Jul 2009 Link to this post

    Hi,
    • Is there a way where Drag and drop shoud not be allowed for the dates lesser than Current date?
    • Also any way to disable the built in validation in Rad Scheduler?
    In my Case, I am using Advance Edit template to update the appointment.
    Start Date and End Date are same.
    I am interested just in the Start Date and time of the appointment and want to update the same thru double click
    ASPX Code here:

     

    <telerik:RadScheduler ID="rsSchedule" runat="server" DataEndField="InducDt" DataKeyField="ID"

     

     

    DataStartField="InducDt" DataSubjectField="SlotDesc" FirstDayOfWeek="Monday"

     

     

    LastDayOfWeek="Saturday" OverflowBehavior="Expand" SelectedView="MonthView" Culture="English (United States)"

     

     

    DayEndTime="19:00:00" DayStartTime="08:00:00" EditFormDateFormat="MM/dd/yyyy"

     

     

    EditFormTimeFormat="h:mm:tt" Height="500px" MonthVisibleAppointmentsPerDay="3"

     

     

    EnableEmbeddedSkins="true" ShowViewTabs="true" Skin="Hay" BackColor="#98cb33"

     

     

    DisplayRecurrenceActionDialogOnMove="True" ShowFullTime="True" AllowDelete="false"

     

     

    AllowInsert="false" TimelineView-UserSelectable="false" CustomAttributeNames="Deliverables">

     

     

    <MonthView VisibleAppointmentsPerDay="3" />

     

     

    <AdvancedEditTemplate>

     

     

    <div style="background-color: #e2f59e">

     

     

    <table align="center" border="0" width="95%" cellpadding="5" cellspacing="0">

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct">

     

     

    <br />

     

     

    </td>

     

     

    </tr>

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct1">

     

     

    <asp:Label ID="lblDescription" AssociatedControlID="lblSubject" runat="server" Text="Description"

     

     

    Font-Bold="true">

     

     

    </asp:Label>

     

     

    </td>

     

     

    </tr>

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct">

     

     

    <br />

     

     

    <asp:Label ID="lblSubject" runat="server" Text='<%# Bind("Subject") %>'>

     

     

    </asp:Label>

     

     

    </td>

     

     

    </tr>

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct">

     

     

    <br />

     

     

    </td>

     

     

    </tr>

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct1">

     

     

    <table width="40%" align="left">

     

     

    <tr>

     

     

    <td class="tableCellInduct1">

     

     

    <asp:Label ID="lblDate" AssociatedControlID="rdtpFrom" runat="server" Text="Induction Date"

     

     

    Font-Bold="true"></asp:Label>

     

     

    </td>

     

     

    <td style="background-color: #e2f59e" align="left">

     

     

    <telerik:RadDateTimePicker ID="rdtpFrom" runat="server" DateInput-ReadOnly="true"

     

     

    SelectedDate='<%# Bind("Start") %>' MinDate='<%# Date.Now.Date %>' TimeView-StartTime="08:00:00"

     

     

    TimeView-EndTime="19:15:00" TimeView-Interval="00:15:00" TimeView-Columns="4">

     

     

    </telerik:RadDateTimePicker>

     

     

    </td>

     

     

    </tr>

     

     

    </table>

     

     

    <tr class="tableRow">

     

     

    <td class="tableCellInduct">

     

     

    <br />

     

     

    </td>

     

     

    </tr>

     

     

    <tr class="tableRow">

     

     

    <td align="center" style="background-color: #e2f59e">

     

     

    <asp:ImageButton ID="btnUpdate" runat="server" CommandName="Update" ImageUrl="~/Images/update.gif"

     

     

    CausesValidation="false" />

     

     

    <asp:ImageButton ID="btnCancel" runat="server" CommandName="Cancel" ImageUrl="~/Images/Cancel.gif"

     

     

    CausesValidation="false" />

     

     

    </td>

     

     

    </tr>

     

     

    </table>

     

     

    </div>

     

     

    </AdvancedEditTemplate>

     

     

    </telerik:RadScheduler>

    Now while editing if I select a date lesser the InductDt(the field from the database binded to Start and End Date) it works fine.
    But if I select a date greater than the InducDt it gives me an error saying that the 'Appointment Start Date and Time should be less than the End Date and Time'.
    I have even tried setting the Causes Validation property of the Update Btn to false and setting the Validation Group of the Scheduler to blank. But no use

    Please suggest a way out of this.

     

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 30 Jul 2009 Link to this post

    Hello Venky,

    1. You can do this by handling OnClientAppointmentMoving and cancelling the event depending on the args.get_targetSlot().get_startTime(). The following example demonstrates a similar concept:
    http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx

    2. The easiest way to remove validation from the advanced from is to use the Advanced Templates. You can download a working sample from here:
    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/sample-project-of-the-customizing-the-advanced-template-example.aspx
    The validation controls are in the AdvancedForm user control.


    Greetings,
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top