DevExpress DateEdit (Date Picker) model binding in MVC

This is the absolute minimum you need to use model binding with the DevExpress date picker control. The important part is that the name setting on the control must be the same as the field name you use to store the picked value in.


using System;

namespace DXWebSample.ViewModels {
    public class DemoViewModel {
        public DateTime PickedValue { get; set; }


@model DXWebSample.ViewModels.DemoViewModel
<h2>Date Picker demo</h2>
@using (Html.BeginForm()) {
        DevExpress date picker model binding, make sure the name
        of the picker and the property on the model match.
        settings => {
            settings.Name = "pickedValue";
    if (!string.IsNullOrWhiteSpace(ViewBag.Message)) {
    <input type="submit" value="update"/>


using System;
using System.Web.Mvc;
using DXWebSample.ViewModels;

namespace DXWebSample.Controllers {
    public class HomeController : Controller {
        #region Methods

        // GET: Home
        public ActionResult Index() {
            DemoViewModel model = new DemoViewModel {
                PickedValue = DateTime.Now.Date
            return View(model);

        public ActionResult Index(DemoViewModel model) {
            ViewBag.Message = model.PickedValue.ToString();
            return View(model);