Toolbar disabled input loading from xml

Hi, I have the following xml

<?xml version="1.0" encoding="utf-8" ?> <toolbar> <item id="play" type="buttonTwoState" img="play.png" text="Play" title="Play the succeeding values changes"></item> <item id="sep01" type="separator"/> <item id="startDate" type="buttonInput" enabled="false" text="Start Date" title="Choose the animation start date"></item> <item id="startDatePic" type="button" img="minicalendar.gif" title="Choose the animation start date"></item> <item id="endDate" type="buttonInput" enabled="false" text="End Date" title="Choose the animation end date"></item> <item id="endDatePic" type="button" img="minicalendar.gif" title="Choose the animation end date"></item> </toolbar>

the “startDate” and “endDate” inputs are not being disabled on load. What am I doing wrong? Thanks

hello,

disabled state can not be set by the xml. You may try to use the following approach to disable all inputs initially:

toolbar.loadXML(url,function(){ toolbar.forEachItem(function(itemId){ if (toolbar.objPull[toolbar.idPrefix+itemId]["type"] == "buttonInput") toolbar.disableItem(itemId) }) });