Skip to Content
Menu
This question has been flagged
2350 Views

The requirment is i have created a dropdown button next to month button in calendar. If i click on that dropdown it show the value t1,t2,t3..

Now if i click t1 from dropdown. inside Calendar view it should display 't1'.


XML Code:

<div t-if="widget.model === 'service.advisor.planner'" id="myDropdown" class="dropdown-content">
<select>
<option value="planner">Planner</option>
<option value="bays">Bays</option>
<option value="drivers">Drivers</option>
<option value="technician">Technician</option>
</select>
</div>


JS code: written in fullcalendar.js

t.firstStep = firstStep;

function firstStep(this) {               
    //Grab information from input element object               
    // /and place them in local variables               
    var select_name = element.name;               
    var option_value = element.value;                   
}

var option_user_selection = element.options[ element.select_name ].text;


  I need to know that how to execute xml code from JS function?  


Avatar
Discard