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
555
Possible Bug: Can't get value! igDatePicker("value"), igDatePicker("getValueByMode","text"), etc, all return instances of the igDatePicker()
posted

I have an Infragistics 12.1 jQuery DatePicker on my page and I'm trying to read the value (client-side) of the DatePicker, when another control's event is fired.

I've tried the following methods in an attempt to retrieve the DatePicker's value but each one seems to return an instance of the DatePicker itself:

alert($("#txtDate").igDatePicker("text"));
alert($("#txtDate").igDatePicker("value"));
alert($("#txtDate").igDatePicker("getSelection"));
alert($("#txtDate").igDatePicker("getSelectedText"));

Each one returns an Object which appears to be an instance of the DatePicker itself because if I enumerate through the properties of the returned object, I can see internal methods such as init(), trigger(), toggle(), die() igDatePicker(), etc.

My MasterPage should be fine because I've also got a igCombo on the same page and am having no issues accessing its value. Here is what I have in my MasterPage:

<script type="text/javascript" src="/Scripts/Infragistics/jQuery/infragistics.loader.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui.js"></script>
    <%= Html.Infragistics()
        .Loader()
        .ScriptPath("/Scripts/Infragistics/jQuery/")
        .CssPath("/Styles/Infragistics/jQuery/")
        .Render()
    %>

Can anyone help??

Thank you in advance

Parents
No Data
Reply
  • 23953
    Verified Answer
    Offline posted

    Hi Andrew,

     

    The MVC Wrappers for igEditor related controls(igDatePicker is one of them) instantiate igEditor control on the client side(you can see it yourself by examining the JavaScript code generated by the MVC Wrapper in your page), so you should use igEditor instead of igDatePicker in order to use the API. The same is for the event handling.

    Please read Configuring igEditors at Runtime topic for more information.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Children