Solved

MVC 5 Bootstrap datepicker in IE/Firefox

Posted on 2014-07-24
2
5,501 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

914 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

20 Experts available now in Live!

Get 1:1 Help Now