2
<body> <div class="form-group col-xs-6"> <label class="col-sm-2 control-label" for="exampleInputEmail">Date From:</label> <div class="col-sm-10"> <input name="DATEFROM" id="dateFrom" type="date" class="form-control"> </div> </div> <div class="form-group col-xs-6"> <label class="col-sm-2 control-label" for="exampleInputEmail">Date To:</label> <div class="col-sm-10"> <input name="DATETO" id="dateTo" type="date" class="form-control"> </div> </div> </body> <script src="Scripts/jquery-2.1.4.min.js"></script> <script src="Scripts/bootstrap.min.js"></script> <script src="js/jquery-1.9.1.min.js"></script> <script src="js/bootstrap-datepicker.js"></script> <script type="text/javascript"> // When the document is ready,Datepicker code below $(document).ready(function () { $('#dateFrom').datepicker({ format: "dd/mm/yyyy" }); }); </script> 

Initially there is a body tag in which date fields are given named as Date from and Date to field.

After that i have included some scripts as i am writing my project in bootstrap. The last script is meant for datepicker

But when i load my page, datepicker doesn't come up in ie but works perfectly fine in chrome It gives error that Object doesn't support method or property 'datepicker'

Error: Object doesn't support method or property datepicker

4
  • 1
    by the way why are you loading two jquerys? Commented Jul 27, 2015 at 7:30
  • 2
    You have 2 versions of jquery referred! keep the latest one!! Commented Jul 27, 2015 at 7:36
  • The issue is the jquery loading, i have an example for you jsfiddle.net/mhoppchc Commented Jul 27, 2015 at 7:39
  • Thanks @Jim it worked like a charm :D Commented Jul 27, 2015 at 8:46

1 Answer 1

4

The issue will be entirely related to you loading 2 seperate versions of jquery.

Your code works with one version loaded: https://jsfiddle.net/329suzv9/

$(document).ready(function () { $('#dateFrom').datepicker({ format: "dd/mm/yyyy" }); }); 
Sign up to request clarification or add additional context in comments.

1 Comment

Worked like a charm @Reece Sheppard

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.