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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DatePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

102782 Mar 1,2012 12:32 PM UTC Mar 6,2012 04:36 PM UTC Mobile MVC(Classic) 1
loading
Tags: Tools
Christian Sandöy
Asked On March 1, 2012 12:32 PM UTC

How do I call an action on a controller when a date is selected


Krishnaraj D [Syncfusion]
Replied On March 6, 2012 04:36 PM UTC

Hi Christian Sandoy,

Thanks for using Syncfusion Products.

We have provided “OnDateSelected” event, which gets triggered whenever date is selected. In your case, you can use $.ajax to call particular action.

Refer the following steps.

1.Render the control and set the “OnDateSelected("OnSelect")” event in View Page as mentioned below.

@{
Html.MobSyncfusion().DatePicker("DataPicker5").AutoFormat(MobSkins.DarkNight).Mode(Mode.Simple).OnDateSelected("OnSelect").Render();
}


2.Refer the below script to handle “OnDateSelected” event.




3.Get the values in Post Action as mentioned below and call the action as your desired.

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult OnSelect(Mode Value)
{
return View();
}

For your additional reference we have attached a sample hereby. Please let us know if you have any further concerns.

Thanks,
Krishnaraj D



DatePicker_71de051d.zip

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

;