1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Events Module dates

Events Module dates

2 posts, 0 answered
  1. ddblee
    ddblee avatar
    20 posts
    Registered:
    24 Jul 2008
    20 Feb 2009
    Link to this post
    ~Sitefinity\Admin\ControlTemplates\Events\ControlPanelEdit.ascx seems to be built with teh RADDatePicker control when it comes to the Schedule section for entering dates. We would like to make these fields required. Is there a quick way to do this using the control logic? Or do we have to write ASP.NET handlers to accomplish that?

    If we have to roll our own, any tips on how to begin -- since the RADDatePicker does not seem to obviously extend the ASP.NET TextBox control?

    Thanks!

  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    24 Feb 2009
    Link to this post
    Hi Lee,

    You could use RequiredFieldValidator control to make the date fields required. For example:

    ~/Sitefinity/Admin/ControlTemplates/Events/ControlPanelEdit.ascx
    <telerik:raddatetimepicker id="Event_Start" runat="server"
    </telerik:raddatetimepicker> 
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Event_Start" Display="Dynamic" EnableViewState="False" CssClass="validMessage" SetFocusOnError="True"
           <strong> 
              <asp:Literal ID="Literal13" runat="server" Text="Event start cannot be empty!" /> 
           </strong> 
    </asp:RequiredFieldValidator> 

    Please explain in details if there is some misunderstanding.

    Kind regards,
    Pepi
    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.
2 posts, 0 answered