This is a migrated thread and some comments may be shown as answers.

Switch & NumericTextBox Properties Ignored

1 Answer 103 Views
Form
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
Joel asked on 29 Sep 2020, 10:46 PM

It seems that property settings are ignored.

  • Switch is supposed to say YES/NO but no text is visible.
  • NumericTextBox Max, Min, Step are all ignored.

My form:

    @(Html.Kendo().Form<Customer>()
    .Name("form")
    .HtmlAttributes(new { action = "Layout", method = "POST" })
    .Validatable(v =>
    {
        v.ValidateOnBlur(true);
        v.ValidationSummary(vs => vs.Enable(true));
    })
    .Items(items =>
    {
        items.AddGroup()
            .Label("Registration")
            .Grid(g => g.Cols(1).Gutter(10))
            .Items(i =>
            {
                i.Add()
                     .Field(f => f.Name)
                     .Label(l => l.Text("Name:").Optional(false));
                i.Add()
                    .Field(f => f.TwoFactorEnabled)
                    .Label(l => l.Text("Multi-factor Required:"))
                    .Editor(e =>
                    {
                        e.Switch().Messages(c => c.Checked("YES").Unchecked("NO"));
                    });
            });
 
        items.AddGroup()
            .Label("Licensing")
            .Items(i =>
            {
                i.Add()
                    .Field(f => f.MaximumUserCount)
                    .Label(l => l.Text("Maximum User Count:").Optional(true))
                    .Editor(e =>
                    {
                        e.NumericTextBox().Max(1000).Min(0).Format("n0").Decimals(0).Step(10);
                    });
                i.Add()
                    .Field(f => f.LicenseActivationTimestamp)
                    .Label(l => l.Text("License Activation:").Optional(true))
                    .Editor(e => e.DatePicker()
                        .HtmlAttributes(new {style = "width: 100%", title = "datepicker"})
                        //.Format("MM/dd/yyyy")
                        .DateInput(true));
                i.Add()
                    .Field(f => f.LicenseRenewalTimestamp)
                    .Label(l => l.Text("License Renewal:").Optional(true))
                    .Editor(e => e.DatePicker()
                        .HtmlAttributes(new { style = "width: 100%", title = "datepicker" })
                        .Format("MM/dd/yyyy")
                        .DateInput(true));
            });
    })
    .Events(ev => ev.ValidateField("onFormValidateField").Submit("onFormSubmit").Clear("onFormClear"))
)

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 02 Oct 2020, 04:53 PM

Hello Joel,

I assume you are using one of the themes mentioned in Dimitar's post here: https://www.telerik.com/forums/messages-not-appearing#E_pGE8m7FEuE8-OhZpiCKw He has provided a workaround for the text of the Switch not appearing.

As for the options of the NumericTextBox, not having effect, this is due to a known bug: https://github.com/telerik/kendo-ui-core/issues/6023

I've added a comment to the issue and raised its priority.

Regards,
Ivan Danchev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Form
Asked by
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or