View:

```
    <div class="row">
  <div class="col-md-1">
    @Html.LabelFor(model => model.DoingDateTime, new { @class = "control-label" })
  </div>

  <div class="col-md-3">
    @if (TaskOwner == false && ActionName.ToLower() == "edit" )
    {
      @Html.TextBoxFor(model => model.DoingDateTime, new { @class = "form-control text-center", lang = "en", @readonly = "readonly" })// ,@onchange = "setdefaultmaturitydate();"
    }
    else
    {
      @Html.TextBoxFor(model => model.DoingDateTime, new { @class = "form-control text-center datepicker", lang = "en" })
    }
  </div>

  <div class="col-md-2">
    @Html.ValidationMessageFor(model => model.DoingDateTime)
  </div>

  <div class="col-md-1">
    @Html.LabelFor(model => model.ReferencesTo, new { @class = "control-label" })
  </div>

  <div class="col-md-3">
    @if (TaskOwner == false && ActionName.ToLower() == "edit" )
    {
      @Html.TextBoxFor(model => model.CombinatorialReferenceToFullName, new { @class = "form-control", lang = "en", @readonly = "readonly" })
      @Html.HiddenFor(model => model.Task_ReferenceTo)
    }
    else
    {
      if (ActionName.ToLower() == "create")
      {
        @Html.ListBoxFor(model => model.ReferencesTo, (MultiSelectList)(ViewData["ReferenceTolist"]), new { @class = "form-control chosen-select" })
      }
      else
      {
        @Html.DropDownListFor(model => model.Task_ReferenceTo, (SelectList)(ViewData["ReferenceTolist"]), new { @class = "form-control chosen-select" })
      }
    }
  </div>
  <div class="col-md-2">
    @Html.ValidationMessageFor(model => model.ReferencesTo)
  </div>
</div>

```

Controller:

```
    [AllowAnonymous]
public ActionResult UserVacationInDay(List<int> userIds, string vacationDate)
{
  //Code...
  if (vacations.Count() > 0)
  {
    message = "Test";
  }

  return Json(new { Message = message }, JsonRequestBehavior.AllowGet);
}

```

Ajax:

```
$("form").submit(function (e) {
            var uids = $('#ReferencesTo').val();
            var vDate = $("#DoingDateTime").text();

            $.ajax({
                url: '@Url.Action("UserVacationInDay", "Vacation")',
                dataType: 'json',
                data: {
                    userIds: uids,
                    vacationDate: vDate
                },
                type: 'post',
                success: function (data) {
                    if (data.Message != "" && data.Message != null) {
                        alert(data.Message);
                    }
                },
                error: function (xhr) {
                    alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
                }
            });
    });

```

When ajax runs, it first goes to the error section, returns the status error: 0. Then it goes to the controller, but after returning to the AJAX, the Success section is not executed.

When the date field is not set by the user in the program, the AJAX works correctly without error.
When I set the date field manually in the ajax, it works again without error.

How do I read the date field to avoid the problem?