jQuery UI Widgets Forums Editors DateTimeInput disabled property doesn't work properly

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 1 year, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • disabled property doesn't work properly #103006



    Here is my Typescript code:

     this._startDate = jqwidgets.createInstance('#starting_date', "jqxDateTimeInput",
                { placeHolder: 'NA', width: '160px', height: '22px' }
    this._startDate.disabled = true;

    But the control is not disabled. To make it work I have to write something like:`(<any>$(‘#starting_date’)).jqxDateTimeInput({ disabled: true });

    Thx you for your great tools !

    disabled property doesn't work properly #103014


    Hello youkou,

    You should use setOptions method for setting properties to the widget.
    Here is an example:

    /// <reference path="./jqwidgets.d.ts" />
    function createDateTimeInput(selector) {
        var options: jqwidgets.DateTimeInputOptions =
            placeHolder: 'NA',
            width: '160px',
            height: '22px'
        var myDateTimeInput: jqwidgets.jqxDateTimeInput = jqwidgets.createInstance(selector, 'jqxDateTimeInput', options);
        myDateTimeInput.setOptions({ disabled: true });

    I would also suggest you to read this Article about using jQWidgets with TypeScript.

    Best Regards,

    jQWidgets Team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.