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

DatePickerFor Not rendering (Error with Method Not Found) ?

Thread ID:

Created:

Updated:

Platform:

Replies:

121294 Nov 28,2015 07:39 PM UTC Nov 30,2015 11:27 AM UTC ASP.NET MVC 1
loading
Tags: DatePicker
Brian Stewart
Asked On November 28, 2015 07:39 PM UTC

I'm trying to use the Date Picker on a page Insert page

The View contains

 @Html.EJ().DatePickerFor(model => model.DateOfBirth)


and the mode includes the property

Datetime? DateOfBirth

But i get this error

Method not found: 'Syncfusion.JavaScript.DatePickerPropertiesBuilder Syncfusion.JavaScript.DatePickerExtension.DatePickerFor(Syncfusion.MVC.EJ.EssentialJavaScriptFor`1<!!0>, System.Linq.Expressions.Expression`1<System.Func`2<!!0,!!1>>)'.



Note: first time using the SyncFusion MVC tools - followed the setup guide and can confirm that a grid loads and binds correctly so i believe i've setup the mvc controls okay




Sasikala Nagarajan [Syncfusion]
Replied On November 30, 2015 11:27 AM UTC

Hi Brian,
Thanks for contacting Syncfusion support,
We have analyzed your query and we are unable to reproduce the reported issue in our end. But we suspect the issue may be caused due to the may be the Date Picker control properties are accessed in  controller page without specifying the Syncfusion JavaScript name space in a controller.
Please refer the below code example:

[controller]

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

using Syncfusion.JavaScript;

using Syncfusion.JavaScript.Models;

using WebApplication6.Models;


namespace WebApplication6.Controllers

{

    public class DatePickerController : Controller

    {

       

        public ActionResult Index()

        {

            Incident inc =new Incident();

            inc.SampleDate = DateTime.Now;

            DatePickerProperties dateobj = new DatePickerProperties();

            dateobj.Width = "200px";

            dateobj.DateFormat = "dd/MM/yyyy";

            ViewData["dateobj"] = dateobj;

            return View(inc);

           
        }


 

We have prepared the simple sample with date picker for control. Please get the sample from below location.

Sample : http://www.syncfusion.com/downloads/support/forum/121294/ze/WebApplication6_(3)-716941582

Please check the given sample comparing with your project and let us know if it helps. If still you are facing the problem, please reproduce the issue in given sample and revert us. So that we can check in our side and provide you with a better solution

Regards,

Sasikala Nagarajan


CONFIRMATION

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.

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

;