Solved

MVC 5 Bootstrap datepicker in IE/Firefox

Posted on 2014-07-24
2
5,829 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

738 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