Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How do i add datepicker using bootstrapdatepicker in MVC application?

Am creating one application using .net MVC. I want to add datapicker.
i downloaded bootstrapdatepicker using nu-get package. Could anyone please explain how to use it ?
I tried below but it doesn't work.

Addded js and css files
datepicker3.css
bootstrap-datepicker.js

Then i added one input box in my page
HTML
<input type="text" id="gd" type="text" class="form-control">

added below code as well
C#
$(document).ready(function () {
    $("#gd").datepicker({
        calendarWeeks: true
    });
});


Pleease suggest if you have any other way to do this or explain me how to do this using nuget package ?
But nothing is coming when i click on input box . But am expecting datapicker to populate. What is the issue here? how to use it correctly ?
Posted
Updated 31-Mar-15 21:21pm
v3
Comments
TorstenH. 1-Apr-15 4:16am    
cross post: http://www.codeproject.com/Questions/892385/How-Do-I-Add-Datepicker-Using-Bootstrap-And-Angula?arn=1

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900