简体   繁体   English

如何在Grails上安装eyecon的datepicker?

[英]How do I install eyecon's datepicker on Grails?

I'm trying to implement eyecon's datepicker on my Grails project. 我试图在我的Grails项目中实现eyecon的datepicker So I put this in my ApplicationResources.groovy: 所以我把它放在我的ApplicationResources.groovy中:

datepicker {
    resource url: 'datepicker/css/datepicker.css'
    resource url: 'datepicker/js/bootstrap-datepicker.js'
}

And then I put this in my main.gsp: 然后将其放在main.gsp中:

<r:require module="datepicker" />

And then this is my HTML: 然后这是我的HTML:

<div class="col-lg-12">
    <div class="gray-bg">
        <input type="text" class="datepicker" placeholder="Select date" />
    </div>
</div>

And finally, this is the Javascript: 最后,这是Javascript:

$('.datepicker').datepicker();

But nothing's working... 但是什么都没用...

Try to add jquery to dependencies like this: 尝试将jquery添加到依赖项中,如下所示:

datepicker {
    dependsOn 'jquery'
    resource url: 'datepicker/css/datepicker.css'
    resource url: 'datepicker/js/bootstrap-datepicker.js'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何实现和使用eyecon的bootstrap-datepicker? - How do I implement and use eyecon's bootstrap-datepicker? Eyecon Datepicker无法与引导程序结合使用并减小页面大小 - Eyecon datepicker doesn't work in combination with bootstrap and reduced page size 使用eyecon bootstrap datepicker显示“全月名yyyy” - Display 'Full-month-name yyyy' with eyecon bootstrap datepicker 如何在jQuery UI的datepicker的beforeShow方法中获取规范化的最小值/最大值? - How do I to get the canonicalized min/max values in jQuery UI's datepicker's beforeShow method? 如何在每次使用jQuery或javascript后的下午6:30之后禁用datepicker中的今天日期 - How do I disable today's date in datepicker after 6:30pm of every using jQuery or in javascript 如何用今天的日期预填充jQuery Datepicker文本框? - How do I pre-populate a jQuery Datepicker textbox with today's date? jQuery DatePicker - 如何显示今天的月而不是选定的日期? - jQuery DatePicker - How do I show today's month instead of the selected dated? 如何在jQuery UI Datepicker中为td元素提供自定义ID? - How do I give td elements custom id's in jQuery UI Datepicker? 如何使用引导日期选择器格式化日期? - How do I format the date with bootstrap datepicker? Fuelux datepicker如何初始化它? - Fuelux datepicker how do I initialise it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM