-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·47 lines (28 loc) · 1.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
JqueryDatepicker
================
JqueryTimepicker is a fork of the simple Rails jQueryDatepicker plugin that integrates jQuery Timepicker (https://github.com/trentrichardson/jQuery-Timepicker-Addon) with your Rails application.
Installation
=======
Go to your application dir and type
script/plugin install git://github.com/cryo28/jquery_timepicker.git
IMPORTANT!
You must include in your layout ( if you don't have yet):
<%= stylesheet_link_tag :jquery_timepicker %>
<%= javascript_include_tag :jquery_timepicker %>
Also somewhere before these lines you should include jquery and jquery-ui. Also you can include them from google cdn by
using an extension, provided by this plugin as follows:
<%= javscript_include_tag :jquery_cdn %>
Also please make sure that you fetched the git submodule, which is used by this plugin - jquery_timepicker_addon. (git submodule init && git submodule update inside the plugin's directory)
That's it! Now you can add a timepicker field in your view.
Example
=======
Add this to your view.
<%= timepicker_input "user","birthday" %>
Where "user" is your model name and "birthday" the name of the datefield.
You can also use it with the form helper like:
<% form_for(@user) do |f| %>
<%= f.timepicker 'birthday' %>
<%= f.submit 'Create' %>
<% end %>
=============================================================================
Copyright (c) 2010 cryo28, WaDoMo, released under the MIT license