Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2165
igdatepickertextchanged never fired
posted

I have an igEditor type 3 (same as datepicker), I want to fire an event when text change, so I went to the documentation and found that I must use 

$(document).delegate("#NewDate", "igdatepickertextchanged", function (evt, ui) {
    alert("Fired 1!");
});

I am a good guy so I did exactly that, but it didn't work. So I tried some other ways, finally I found the right one:

$(document).delegate("#NewDate", "igeditortextchanged", function (evt, ui) {
    alert("Fired 4!");
});

Obviously "igeditortextchanged" is not the same as "igdatepickertextchanged". I spent many hours with this issue, now I would like to know if the documentation is wrong or I missed something. Thanks.

This is the complete code:

<!DOCTYPE html>
<html>
<head>
<title></title>

<!-- Ignite UI Required Combined CSS Files -->
<link href="http://cdn-na.infragistics.com/jquery/20141/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
<link href="http://cdn-na.infragistics.com/jquery/20141/latest/css/structure/infragistics.css" rel="stylesheet" />

<script src="http://modernizr.com/downloads/modernizr-latest.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>

<!-- Ignite UI Required Combined JavaScript Files -->
<script src="http://cdn-na.infragistics.com/jquery/20141/latest/js/infragistics.core.js"></script>
<script src="http://cdn-na.infragistics.com/jquery/20141/latest/js/infragistics.lob.js"></script>


</head>

<body>

<input id="NewDate" /><input name="NewDate" type="hidden" />
<script type="text/javascript">
//<!--<![CDATA[
$(function () { $('#NewDate').igEditor({
type: 3,
button: 'dropdown',
dataMode: 'date',
inputName: 'NewDate',
dateDisplayFormat: 'dd/MM/yyyy',
dateInputFormat: 'dd/MM/yyyy',
width: 150 }); });
//]]>--></script>


</body>

<script>
$(function () {

// This should fire, documentation say so (http://help.infragistics.com/jQuery/2014.1/ui.igdatepicker), but it doesn't. WHY?
$(document).delegate("#NewDate", "igdatepickertextchanged", function (evt, ui) {
alert("Fired 1!");
});

// It doesn't fire, so try next.
$(document).delegate("#NewDate", "igdateeditortextchanged", function (evt, ui) {
alert("Fired 2!");
});

// It doesn't fire, so try next.
$(document).delegate("#NewDate", "igtexteditortextchanged", function (evt, ui) {
alert("Fired 3!");
});

// This is OK :)
$(document).delegate("#NewDate", "igeditortextchanged", function (evt, ui) {
alert("Fired 4!");
});

});
</script>

</html>