We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to use angularjs ng-model within html.editor model in mvc

Thread ID:





121109 Nov 11,2015 09:38 AM UTC Nov 12,2015 12:29 PM UTC ASP.NET MVC 1
Tags: DateTimePicker
Asked On November 11, 2015 09:38 AM UTC

@Html.EditorFor(model => model.StartDate, new { ng_model = "model.StartDate" })

i have to print date in client side when i change date-time picker. how can i do this? i used angularJS but i could not print the date. 

Harikrishnan P [Syncfusion]
Replied On November 12, 2015 12:29 PM UTC

Hi Kssan,

Thanks for contacting Syncfusion support.

To achieve your requirement (“print the datetime, when it is changed”) you can make use of the client side events. Using the “change” event of the DateTimePicker, you can print the value as shown in the below code.


    function onChange(e) {




We have attached a sample for your reference, please chk it.


While using Razor syntax, we cannot achieve the two way binding, since to use the Angular support in our component, we need to use the directive “ej-datetimepicker”. Also we need to bind the variable to the $scope.

To know more about the Angular JS support in our components, please refer the following link


Our EJMVC components are created as wrapper for the JavaScript components. So the API, and events will be the same in both JS and EJMVC components. You can refer the following API reference section present in our online JS help document to know about the list of API’s, methods and events supported by each components.





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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon