Bootstrap-Datetimepicker Not working

后端 未结 4 2085
我在风中等你
我在风中等你 2021-01-02 06:26

I have been looking at this for 2 days, and cant figure out what I am doing wrong.

Here is a fiddle with my project. http://jsfiddle.net/dagger2002/RR4hw/

He

4条回答
  •  隐瞒了意图╮
    2021-01-02 07:12

    Easiest way to get date and/or time picker working is by installing below package

    Install-Package Bootstrap.v3.Datetimepicker.CSS 
    

    and then reference installed files in _Layout

    
    
       
    
    
    
    

    and then add below script to layout page before tag

    
    

    in Razor view use as below

    @Html.EditorFor(model => model.MyDate, new { htmlAttributes = new { @class = "form-control datepicker" } })
    @Html.EditorFor(model => model.MyDateTime, new { htmlAttributes = new { @class = "form-control datetimepicker" } })
    

提交回复
热议问题