jQuery UI Widgets Forums Lists ListBox insert jqxDateTimeInput inside a listbox

This topic contains 2 replies, has 2 voices, and was last updated by  logs 8 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • logs
    Participant

    I just achieved how to insert a jqxDateTimeInput in a jqxListBox, but when i select an item in the ListBox all dateTimeInputs disappear , anyone had like this problem please help best regards.

    var source = [
            { html: '<div id="time1"></div>', value:100 },
            { html: '<div id="time2"></div>', value:101 },
            { html: '<div id="time3"></div>', value:102 },
            { html: '<div id="time4"></div>', value:103 },
            { html: '<div id="time5"></div>', value:104 }
           ];
    $("#listTimes").jqxListBox({ itemHeight: 50, allowDrop: true, allowDrag: true, source: source, width: 288, height: 300});
    for(var i=1;i<=5;i++){
     $('#time'+i).jqxDateTimeInput({formatString: "T", showTimeButton: true, showCalendarButton: false, width: 100, height: '25px' }); 
    }

    ivailo
    Participant

    Hi logs,

    When an item is selected, widget items are redrawn, and you have to initialize your widgets again.
    Like a workaround you can bind to the change event.
    It’s triggered when the user selects an item and you can use it to reinitialize your jqxDateTimeInputs.
    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    logs
    Participant

    Hi ivailo,
    Thanks for your help the demo works like a charm , from your reply i understood the problem.
    Thank you very much.
    Best Regards.

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

You must be logged in to reply to this topic.