What events does an
<input type="number" />
fire when its value is changed ?
I working on a .NET application ASP.NET MVC. I am using input text numbers that have up and down arrows.
up increase and down decrease
Which event fires when pressed on these two arrows?
@Html.EditorFor(model => model.DirectManager,
new { htmlAttributes = new { @class = "form-control",
id = "txtDirectManagerId" } })
and this property is as below:
public class requester
{
public int DirectManager{get;set;}
}
So what event will I use when calling jquery API?
What I have tried:
$(document).ready(function () {
$("#txtLineManagerId").autocomplete({
source: function (request, response) {
var searchText = $("#txtLineManagerId").val();
console.log("search text" + searchText)
$.ajax({
url: '@Url.Action
("GetAllEmployeeBasedSearchText", "Resignation")',
data: { searchText: searchText },
method: "GET",
dataType: "json",
success: function (data) {
response($.map(data, function (item) {
console.log("data is" + item.EmployeeID);
return { label: item.EmployeeID,
value: item.EmployeeID,
employeeName: item.EmployeeName };
}))
}
});
},
position: { my: "right top", at: "right bottom" },
appendTo: '#searchContainer',
select: function (event, ui) {
$("#LineManagerName").val(ui.item.employeeName);
$("#selectedEmployeeName").val(ui.item.employeeName);
},
minLength: 4,
});
});