[ kendo scheduler ]scheduler-edit-form dynamic close field validation

1 Answer 50 Views
Editor Scheduler Validation
sun
Top achievements
Rank 2
Iron
Iron
Iron
sun asked on 11 Jul 2022, 06:19 PM

Hi,

     Like Demo : https://dojo.telerik.com/ExuQuSoT

     Field title and description validation require is set true.

     I have a business need :

     When I choose Meeting Room 201 for Field RoomId, I hope that I can mask or turn off the validation and submit it normal.

     How to realize it?

     Thank you very much for your help. 

     

      

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 14 Jul 2022, 03:26 PM

Hello, Sun,

In the edit event you can bind to the RoomId DropDownList and bind to its change event. There you can check the current text of the widget and remove the required attribute from the fields.

edit:function(e){
            	$("[data-container-for='roomId']").children().find("select").data("kendoDropDownList").bind("change", function(e){
              	var text = e.sender.text();
                if(text === "Meeting Room 201"){
                  $("#title").prop('required',false);
                  $("[title='Description']").prop('required',false);
                }
              })
            },

Regards,
Martin
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.

sun
Top achievements
Rank 2
Iron
Iron
Iron
commented on 17 Jul 2022, 03:42 PM

Hi, Martin,

Thanks it works perfectly. Thank you very much for your help.

Tags
Editor Scheduler Validation
Asked by
sun
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Martin
Telerik team
Share this question
or