部署后,jQuery UI Datepicker不发布到服务器

问题描述

| 因此,我发布了一个ASP.Net MVC3项目,该项目在IIS服务器上使用jQuery UI datepicker。日期选择器似乎没有发布其值,而在后端恢复为默认值。 在本地,尽管它像一种魅力。它是简单的jQuery,在datepicker上没有任何选项。 关于为什么会发生的任何线索? 让我知道我可以发布什么来帮助找到解决方案。 谢谢! 我尝试回发的模型:
public class Report
{
    [Required]
    [DisplayFormat(DataFormatString = \"{0:d}\",ApplyFormatInEditMode = true)]
    public DateTime From { get; set; }
    [Required]
    [DisplayFormat(DataFormatString = \"{0:d}\",ApplyFormatInEditMode = true)]
    public DateTime To { get; set; }

    public virtual Car Car { get; set; }
    public virtual IEnumerable<Review> Reviews { get; set; }
}
我使用的表格:
@model Cars.Models.Report

<h3>Create a report</h3>
@using (Html.BeginForm(\"Generate\",\"Report\"))
{
<div>
    <div class=\"span-5\">
        <div class=\"editor-label\">
            @Html.LabelFor(model => model.From)
        </div>
        <div class=\"editor-field\">
            @Html.TextBoxFor(model => model.From,new { @class = \"datepicker lilbig\" })
        </div>
    </div>

    <div class=\"span-5 last\">
        <div class=\"editor-label\">
            @Html.LabelFor(model => model.To)
        </div>
        <div class=\"editor-field\">
            @Html.TextBoxFor(model => model.To,new { @class = \"datepicker lilbig\" })
        </div>
    </div>

    <div class=\"span-11 last\">
        <div class=\"prepend-5 last\">
            <input class=\"bigbtn\" type=\"submit\" value=\"Create\" />
        </div>
        <div>
            @Html.ValidationSummary(true)
            @Html.ValidationMessageFor(model => model.From)
            @Html.ValidationMessageFor(model => model.To)
        </div>
    </div>
</div>
}
我要发布的方法:
[HttpPost]
    public ActionResult Generate(Report model)
    {
        try
        {
            MembershipUser currentUser = Membership.GetUser(HttpContext.User.Identity.Name);
            Guid id = (Guid)currentUser.ProviderUserKey;
            Car currentCar = CarRepository.Get(id);

            currentCar.LastReportCreated = DateTime.Now;
            currentCar = CarRepository.Update(currentCar,true);

            model.Car = currentCar;
            model.Reviews = model.Car.Reviews.Where(s => s.LoggedAt.Date >= model.From.Date &&
                                                               s.LoggedAt.Date <= model.To.Date);

            return View(\"Report\",model);
        }
        catch(Exception ex)
        {
            return View(\"Error\");
        }
    }
jQuery看起来像这样:
$(document).ready(function () {
    $(\".datepicker\").datepicker();
});
    

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)