Grails 日期选择器
我正在为我的 Grails 应用程序寻找日历组件。我知道 Grails 已经有了 g:datePicker
,但它有点原始,而且视觉上不太吸引人。
我查看了 contribute-a-tag 页面和 grails插件门户并且有多种选择。如果有人能特别推荐一个,我将不胜感激,而不是全部尝试。我的要求是:
- 必须允许选择日期和时间,例如 2010 年 3 月 24 日上午 9 点
- 应该很容易绑定到日期类型的域对象属性并在 UI 中显示任何验证错误
- 我更喜欢基于 JQuery 的东西,但我我对替代方案持开放态度。
我实际上只是在寻找允许用户轻松选择特定时间点的东西,而不是像 JQuery 日历。
干杯, 大学教师
I'm looking for a calendar component for my Grails app. I'm aware that Grails already has the g:datePicker
, but it's a bit primitive and not very visually appealing.
I've had a look on the contribute-a-tag page and in the grails plugin portals and there's a wide range of options. Rather than trying them all out, I'd be very grateful if anyone could recommend one in particular. My requirements are:
- Must allow selection of a date and time, e.g. 9AM on 24 March 2010
- Should be easy to bind to a domain object property of type Date and display any validation errors in UI
- I'd prefer something based on JQuery, but I'm open to alternatives.
I'm really just looking for something that will allow the user to easily choose a particular point in time, rather than a fully-featured calendar like JQuery Calendar.
Cheers,
Don
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您有两个流行的选项: GrailsUI 有一个日期选择器(请参阅页面),RichUI 也是如此。它们都使用 YUI,但 RichUI 使用更多的库来处理时间线、日历视图等内容。到目前为止我只使用过 GrailsUI,需要注意的一件事是在“grails-app\views\layouts\main.gsp”中使用正确的正文样式类:
You have two popular options: GrailsUI has a date picker (see the very end of the page), and so does RichUI. They both use YUI, but RichUI uses some more libraries for stuff like timeline, calendar view and such. I've only used GrailsUI so far, and the one thing to look out for is to use the proper body style class in your "grails-app\views\layouts\main.gsp":
我知道这可能有点晚了,但我已经分叉了一个名为 glDatePicker 的项目并添加了一些时间选择器功能。看看https://github.com/dfisch/glDatePicker
I know this may be a little bit late but I have forked a project called glDatePicker and added some time picker functionality. Check it out https://github.com/dfisch/glDatePicker
如果你想要基于 JQuery 的东西,你可以查看 JQueryUI (http://jqueryui.com/datepicker/) 。如果您愿意,它可以很复杂,但通常非常简单,因此我认为适合您想要的。已经有一个现有的 grails 插件了
If you want something JQuery based, you could check out JQueryUI (http://jqueryui.com/datepicker/). It can be complex if you want it to be, but is generally very simple and thus I think fits with what you want. There is an existing grails plugin in for it already as well