asp.net mvc gridmvc datepicker

时间:2015-10-07 13:46:11

标签: asp.net-mvc datepicker

我是mvc概念的初学者,我正在尝试在我的mvc项目中实现一个datepicker,哪些步骤仍然缺失?

<div class="form-group">
        @Html.LabelFor(model => model.Date, new { @class = "control-label col-md-2" })
        <div class="col-md-10 date-picker">
            @Html.EditorFor(model => model.Date, "", new { @class = "date-picker" })
            @Html.ValidationMessageFor(model => model.Date)
        </div>
    </div>

我已经使用Nuget来安装gridmvc datepicker。我也放了_layout.cshtml:

<script type="text/javascript">
    $(function () {
        // This will make every element with the class "date-picker" into a DatePicker element
        $('.date-picker').datepicker();
    })
</script>

直到现在 - 我只获得文本框而不是日历

0 个答案:

没有答案