如何在Mvc应用程序中使用Bootstrapdatepicker添加Datepicker? [英] How Do I Add Datepicker Using Bootstrapdatepicker In Mvc Application?

查看:94
本文介绍了如何在Mvc应用程序中使用Bootstrapdatepicker添加Datepicker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在MVC应用程序中使用bootstrapdatepicker添加datepicker?



使用.net MVC创建一个应用程序。我想添加数据贴纸。

我使用nu-get包下载了bootstrapdatepicker。有人可以解释一下如何使用它吗?

我在下面试过但它不起作用。



添加js和css文件

datepicker3.css

bootstrap-datepicker.js



然后我在页面中添加了一个输入框

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

<input type="text" id="gd" type="text" class="form-control">



下面还添加了代码


added below code as well

$(document).ready(function () {
    $("#gd").datepicker({
        calendarWeeks: true
    });
});





如果您有任何其他方法可以做到这一点或者使用nuget解释我如何做到这一点包裹?

但是当我点击输入框时什么都没有。但我期待数据贴纸的填充。这是什么问题?如何正确使用?



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 ?

推荐答案

(document).ready(function(){
(document).ready(function () {


#gd)。datepicker({
calendarWeeks: true
});
});
("#gd").datepicker({ calendarWeeks: true }); });





如果您有其他办法可以做这个或者解释我如何使用nuget包来做到这一点?

但是当我点击输入框时什么都没有。但我期待数据贴纸的填充。这是什么问题?如何正确使用?



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 ?


这篇关于如何在Mvc应用程序中使用Bootstrapdatepicker添加Datepicker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆