我正在使用pickadate.js
。以下是代码: -
@using (Html.BeginForm("Training", "Employee", FormMethod.Post, new { @id = "FTrain" }))
{
<div class="form-group">
<div class="control-label col-sm-2">From Date</div>
<div class="col-sm-10">
@Html.TextBoxFor(model => model.FromDate, new { @class = "form-control datepicker", @type = "text", @Id = "txtFromdt" })
</div>
</div>
<input type="submit" class="btn btn-sm theming-btn waves-effect" value="Save"/>
}
$(document).ready(function () {
// Materialize Date Picker
var pickerinput = $('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 100, // Creates a dropdown of 15 years to control year
format: 'dd/mm/yyyy',
onClose: function () {
if (jq.isFunction(window.onCloseDatePickerCustom)) {
onCloseDatePickerCustom();
}
}
});
当我点击提交按钮时,表单没有提交。我的电脑日期格式为MM/dd/yyyy
。
如果我选择日期01/05/2015
&amp;如果日期与此30/05/2015
相符,则不会提交。
知道如何解决这个问题吗?