Skip to content

cryo28/jquery_timepicker

Repository files navigation

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

About

Jquery-ui Datepicker plugin for Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages