[英]Ruby on Rails User Date Input
I've been search around for a good gem/plug-in to allow intuitive user input of a date(ie select a date from a pop-up calendar). 我一直在寻找一个好的gem / plugin来允许用户直观地输入日期(即从弹出式日历中选择一个日期)。
calendardateselect looks really good, but it's no longer in active development, and no longer installs correctly. calendardateselect看起来确实不错,但是不再处于活动开发中,并且无法正确安装。
I found a few others, but they were all quite stale. 我发现了其他一些,但它们都过时了。 What are Stack Overflow users using for date input in rails?
Stack Overflow用户在rails中用于日期输入的是什么?
Per @bjg and @Fortuity jQuery UI is the direction I decided to go. Per @bjg和@Fortuity jQuery UI是我决定去的方向。 Getting it up and running was a little complex, so I wrote a short how-to for others .
安装和运行起来有点复杂,所以我为其他人写了一个简短的方法 。
The jQuery UI Datepicker has been popular among Rails developers since Ryan Bates produced a screencast showing how to use it in a Rails application. jQuery UI Datepicker在Rails开发人员中很受欢迎,因为Ryan Bates制作了一个截屏视频,显示了如何在Rails应用程序中使用它。
For a Rails plugin that uses the jQuery UI Datepicker, look at: 对于使用jQuery UI Datepicker的Rails插件,请查看:
Ryan's screencast includes hints for how to use it with Rails 3. The table_builder plugin is for Rails 2.3. Ryan的截屏视频包含有关如何在Rails 3中使用它的提示。table_builder插件用于Rails 2.3。 I haven't yet seen a datepicker plugin for Rails 3 but it's easy to implement without a plugin.
我还没有看到Rails 3的datepicker插件,但是没有插件很容易实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.