Unplanned
Last Updated: 05 Apr 2021 20:36 by ADMIN

Hello, 

Currently, when a user types in the date instead of using the popup, the textbox returns a red outline but it doesn't allow integrating with the built-in asp.net validators. 

See the below image for a reference. It would be nice if this could also add a validation output.

I did try to use the Regular Expression and Custom Validators without success. When using them, I found that even when a correct date was input, it would throw an error. 

See the following screenshot for reference to this.

Below is the code that I used.

<telerik:RadMonthYearPicker EnableAriaSupport="true" EnableKeyboardNavigation="true"  ID="from_date" name="from_date" runat="server" RenderMode="Lightweight" 
            Width="150px" ToolTip="" Height="40px">
            <DateInput ID="fd_input" DateFormat="MM/yyyy" runat="server" Enabled="true">
            </DateInput>
            </telerik:RadMonthYearPicker>
            <asp:RequiredFieldValidator runat="server" id="v_from_date" ControlToValidate="from_date" ErrorMessage="- Required" CssClass="validator" />
            <asp:RegularExpressionValidator ID="reg_v_from_date" runat="server" ErrorMessage="Invalid From Date" ControlToValidate="from_date" Text="Format: MM/YYYY" ValidationExpression="^\d{4}-\d{2}-\d{2}$" CssClass="validator"></asp:RegularExpressionValidator>

 

 

Unplanned
Last Updated: 16 Oct 2020 08:38 by ADMIN

When multiple RadMonthYearPicker controls are rendered in different GridItems, clicking the pop-up button of the first picker opens the Calendar Month View of the last one.

Set up to reproduce:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Width="800px" RenderMode="Lightweight" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView AutoGenerateColumns="False">
        <Columns>
            <telerik:GridTemplateColumn>
                <ItemTemplate>
                    <telerik:RadMonthYearPicker ID="DatePicker" runat="server" RenderMode="Lightweight">
                        <MonthYearNavigationSettings TodayButtonCaption="Heute" />
                    </telerik:RadMonthYearPicker>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

C#

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    (sender as RadGrid).DataSource = Enumerable.Range(1, 6);
}