我在剑道网格的内联编辑中使用剑道日期选择器。
如果我选择一个值,点击 update ,选择的值是(选择的值)+1。仅当我将代码部署到服务器时才会发生这种情况。在我的本地主机中无法重现
单击更新时,我有以下代码
public ActionResult Update([DataSourceRequest] DataSourceRequest request)
{
CompanyPrepaymentException PPEx = new CompanyPrepaymentException();
try
{
TryUpdateModel(PPEx); // this gets value from current context, the selected data and other required properties
//some logic
if (ModelState.IsValid == true)
{
if (prepayException != null)
{
prepayException.StartDate = PPEx.StartDate;
prepayException.EndDate = PPEx.EndDate;
}
}
}
catch (Exception ex)
{
//catch block
}
return Json(new[] { prepayException }.ToDataSourceResult(request, ModelState));
}