RecurrenceRule remains null after submit in custom editor

1 Answer 209 Views
Scheduler
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 11 May 2022, 08:44 AM

In my scheduler app i made my own editor for events, with contains most of the default inputs and some of my own. However i am having issues getting the RecurrenceEditor working. The RecurrenceEditor does showup and functions as expected in the ui, however when i submit the form after filling in an recurrence, the value in my model remains null and also doesnt throw any errors. All other inputs such as title, time, etc. does show up in my model and works as expected.

My code for the RecurrenceEditor that always submits null:

<div class="form-group">
     <div class="k-edit-label">
             @(Html.LabelFor(model => model.RecurrenceRule))
     </div>
     <div data-container-for="recurrenceRule" class="k-edit-field">
             @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
                 .HtmlAttributes(new { data_bind = "value:recurrenceRule" }))
     </div>
</div>

An example of a input that i use and does work:

<div class="form-group">
     <div class="k-edit-label">
         @(Html.LabelFor(model => model.Description))
     </div>
     <div data-container-for="description" class="k-edit-field">
         @(Html.TextAreaFor(model => model.Description, new { @class = "k-textbox", data_bind = "value:description" }))
     </div>
</div>

 

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 16 May 2022, 05:05 AM

Hello Jeffrey,

The provided configuration seems correct. I do not see anything that might be causing the issue. I tested the reported behavior wit a sample I have and the following is submitted as a recurrence rule:

At the remote endpoint the recurrence rule is bound, as expected:

The definition of the RecurrenceEditor used is the same:

<div class="k-edit-label">
    @(Html.LabelFor(model => model.RecurrenceRule))
</div>
<div data-container-for="recurrenceRule" class="k-edit-field">
    @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
        .HtmlAttributes(new { data_bind = "value:recurrenceRule" }))
</div>

Attached is the sample, in case it is helpful.

Regards,
Aleksandar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Scheduler
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Share this question
or