Difference property from igTextEditor, igNumericEditor, igDatePicker


I want create function that can set readonly for all editor type by 1 function

but i can not differentiate from igTextEditor, igNumericEditor, igDatePicker


function SetReadOnlyForEditor(editorName){

if (isTextEditor)


}else if(isNumericEditor){






On 14.2 version to prevous. You use 1 function to set readonly for editor($(name).igEditor("option","readonly",true))

But now, 15.2 version. You split it to 3 function igTextEditor, igNumericEditor, igDatePicker . So my function has not working


thanks you very much!

  • 10605
    Verified Answer


    You are correct. It is no longer an option to use igEditor in order to reference all types of IgniteUI editors and update properties, etc. I suggest it could be helpful to name the editor container elements based on the editor to be instantiated upon them and thus having the editor type in the editorName so further processing could be done in the function SetReadOnlyForEditor(editorName){}.  

    In case you would like to not couple the functionality with the container names, then I suggest you could check the editor type using data function. For example in case you have an igTextEditor, it is possible to access the object using

    $("#editorName ").data("igTextEditor");

    If there is no igTextEditor instantiated on the #editorName , it will return undefined, so it is an option to check the type of editor and still use the correct syntaxes to change the editor options.

    For example you could use a similar to the following function:

            function SetReadOnlyForEditor(editorName) {
                var editor = $("#editorName").data();
                if (editor.igTextEditor) { window.alert("text editor") //use $(#editorName
                if (editor.igNumericEditor) {
                     window.alert("Numeric Editor") //use $(#editorName
    I expect these will help you achieve your requirements.

  • 1355
    posted in reply to [Infragistics] Ivaylo

    Thank you very much! Ivaylo

    It is very comfortable with my question and very helpful. it works fine for me!

    Thanks again! 

  • 5

    Thanks for sharing this useful information it really helped me lot and check some awesome mehndi designs here.