none
How do I get a date from an object and display it on a page as text? RRS feed

  • Question

  • I have an object that contains a date from database table.

    I would like to use the date from the object to add the following warning message to a page Date cannot be before 12/15/2018

    Here is the object that have date 12/15/2018

    DateTime MyMeetingEarliestDate = HY.Common.HYConfigurationHelper.GetDateFromHYConfiguration("MeetingEarliestDate");

    Right now I have manually put the warning message manually on MeetingTrackingFilter.aspx page.

    <telerik:RadAjaxPanel ID="FilterElementsRAP" runat="server">
        <div style="padding: 2px;">
            <div style="float: left; width: 20px;">
                <asp:CheckBox ID="MeetingDateChk" runat="server" ValidationGroup="FilterGroup" Checked="false" AutoPostBack="true" OnCheckedChanged="MeetingDateChk_CheckedChanged" />
            </div>
            <div style="float: left; width: 220px;">
                <asp:Label ID="MeetingDateLabel" runat="server" AssociatedControlID="MeetingDateChk" Text="Event Date"></asp:Label>
            </div>
            <div style="float: left; width: 120px;">
                <asp:DropDownList ID="MeetingDateDDL" runat="server" Width="100px" AutoPostBack="true" OnSelectedIndexChanged="MeetingDateDDL_SelectedIndexChanged">
    				<asp:ListItem Text="Equals" Value="Equals" Selected="False"></asp:ListItem>
    				<asp:ListItem Text="Between" Value="Between" Selected="False"></asp:ListItem>
                </asp:DropDownList>
            </div>
            <div style="float: left; width: 375px;">
                <span style="display: inline-block !important;">
                    <telerik:RadDatePicker runat="server" RenderMode="Lightweight" ID="MeetingDateRDP1" AutoPostBack="True" OnSelectedDateChanged="MeetingDateRDP1_SelectedDateChanged">
                        <Calendar runat="server" ShowRowHeaders="false"></Calendar>
                    </telerik:RadDatePicker>
                </span>
                <span style="display: inline-block !important;">
                    <asp:Label ID="MeetingDateBetweenLabel" runat="server">&nbsp;And&nbsp;</asp:Label></span>
                <span style="display: inline-block !important;">
                    <telerik:RadDatePicker runat="server" RenderMode="Lightweight" ID="MeetingDateRDP2" AutoPostBack="True" OnSelectedDateChanged="MeetingDateRDP2_SelectedDateChanged">
                        <Calendar runat="server" ShowRowHeaders="false"></Calendar>
                    </telerik:RadDatePicker>
                </span>
                <span style="font-size: small">Date cannot be before 12/15/2018</span>
            </div>
        </div>
    </telerik:RadAjaxPanel>

    Please help.

    • Moved by CoolDadTx Wednesday, October 16, 2019 5:20 PM Third party product
    Wednesday, October 16, 2019 2:51 PM

All replies

  • I have figure this out. I no longer need help. Please cancel question or delete it for me.
    Wednesday, October 16, 2019 4:47 PM