首页 > 解决方案 > mvc html如何创建datetimepicker怎么做

问题描述

我想在我的 mvc 应用程序中创建一个 datetimepicker usgin html 我有下面的控件

      <div class="col-md-3">
                        @Html.TextBox(model => model.Trip_Time, "{yyyy-MM-dd 12:00:00}", new { @class = "form-control", @readonly = true })
                        @Html.ValidationMessageFor(model => model.Trip_Time)
                    </div>

jquery代码是

    $("#Trip_Time").datetimepicker({
            showOn: "button",
            showSecond: true,
            dateFormat: "dd-mm-yy", 
            timeFormat: "HH:mm:ss",

     
        });

问题是当我点击只读的文本框时没有显示

标签: htmlmodel-view-controllerdatetimepicker

解决方案


推荐阅读