Solved

MVC 5 Bootstrap datepicker in IE/Firefox

Posted on 2014-07-24
2
5,400 Views
Last Modified: 2014-07-24
Hi

I have a MVC 5 website made using Razor layout and Bootstrap. I have a datepicker on my page, which works perfectly in Chrome, but not at all in Internet Explore 10/11 or in FireFox (latest version).

I have the following code in my View:

<div class="row">
    <div class="col-sm-4">
      <div class="form-group">
        <div class="input-append date" id="dpFromDate" data-date="13-02-2012" data-date-format="dd-mm-yyyy">
          @Html.LabelFor(m => m.FromDate)
          <input type="date" id="FromDate" value="13-02-2012" class="form-control" />
          <div class="description">Datoen skal være i formatet dd-MM-åååå</div>
        </div>
      </div>
    </div>
    <div class="col-sm-4">
      <div class="input-append date" id="dp3" data-date="14-02-2012" data-date-format="dd-mm-yyyy">
        <div class="form-group">
          @Html.LabelFor(m => m.ToDate)
          <input type="date" id="startdato" value="14-02-2012" class="form-control" />
          <div class="description">Datoen skal indtastes i formatet dd-mm-åååå</div>
        </div>
      </div>
    </div>
  </div>

Open in new window


As mentioned the datepicker works in Chrome, but in IE and Firefox it is just a "dumb" input field.

Does anyone know how to make it work in IE and Firefox?

/Søren
0
Comment
Question by:poultarp
2 Comments
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 40217459
Html5 input type="date" is not supported in IE and FF.
html5 Date input supporthttp://www.w3schools.com/html/html5_form_input_types.asp

On how to make it work, you can use some external plugins e.g.: http://www.eyecon.ro/bootstrap-datepicker/
0
 
LVL 1

Author Closing Comment

by:poultarp
ID: 40218600
Well - guess that explains it!

Thanks for the link to the plugin.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now