Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143417 | Mar 19,2019 06:47 PM UTC | Mar 21,2019 09:40 AM UTC | jQuery | 3 |
![]() |
Tags: ejDatePicker |
@{IDictionary<string, object> datepickerHtmlAttribute = new Dictionary<string, object>();
//Binding the onchange event to the input element of the DatePicker using its HtmlAttributes property
datepickerHtmlAttribute.Add("onchange", "inputValueChange()");
}
<div id="ControlRegion">
<div class="frame ">
<div class="control">
@*Binding the onchange event to the input element of the DatePicker using its HtmlAttributes property*@
@Html.EJ().DatePicker("dateId").HtmlAttributes(datepickerHtmlAttribute)
</div>
</div>
<style>
.frame .control {
margin-left: 100px;
}
</style>
<script>
function inputValueChange() {
//By binding the native onchange event to the input element of the DatePicker,
//we can get the value entered in the input element
var value = document.getElementById("dateId").value;
console.log("Value in the input element: " + value);
}
</script>
</div> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.