Q:

DateTimePicker not working

I've been working on MVC project, and I've been trying to integrate (jquery) datetimepicker so far if I add it as a simple HTML control it works as expected:
_layout.cshtm
    @Scripts. Render("~/bundles/jquery")

BundleConfig.cs
    bundles. Add(new ScriptBundle("~/bundles/jquery").Include(
          "~/Scripts/jquery-{version}.js"));

View
     >
    
<p>Date: <input type="text" id="datetimepicker" /></p>

<script type="text/javascript">
   jQuery('#datetimepicker').datetimepicker({});
</script>

But when I try to used embeded on my code it don't work:
 <div class="form-group">
        @Html. LabelFor(model => model.deliveryDate, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html. TextBoxFor(model => model.deliveryDate, new { @id = "datetimepicker", @type="text" })
            @Html. ValidationMessageFor(model => model.deliveryDate)
        </div>
    </div>

Any suggestion? 
Please let me know if you need more code, I would gladly to share it. 

A:

I had a similar problem before and the problem is the { @id = "datetimepicker", @type="text" } the reference: jQuery('#datetimepicker').datetimepicker({}); it's ok,  but you need replace the type=text for type="datatime" that should works
<div class="form-group">
        @Html. LabelFor(model => model.deliveryDate, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html. TextBoxFor(model => model.deliveryDate, new { @id = "datetimepicker", @type="datetime" })
            @Html. ValidationMessageFor(model => model.deliveryDate)
        </div>
    </div>

