jquery_datepicker 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,6 +4,8 @@ This simple gem allows you to add a date picker field into your views.
4
4
 
5
5
  == Getting Started
6
6
 
7
+ Pre Rails 3.1:
8
+
7
9
  1. Add into your Gemfile:
8
10
 
9
11
  gem 'jquery-rails'
@@ -17,6 +19,20 @@ This simple gem allows you to add a date picker field into your views.
17
19
 
18
20
  gem 'jquery_datepicker'
19
21
 
22
+ Don't forget to install the CSS!
23
+
24
+ Rails 3.1:
25
+
26
+ 1. Insert into your Gemfile:
27
+
28
+ gem 'jquery_datepicker'
29
+
30
+ 2. If you are using Rails 3.1 with the asset pipeline enabled (default), the necessary files are already in your asset pipeline. Just add (if they are not already there) to your app/assets/javascripts/application.js:
31
+
32
+ //= require jquery
33
+ //= require jquery-ujs
34
+ //= require jquery-ui
35
+
20
36
 
21
37
  == Usage
22
38
 
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'echoe'
4
4
  require 'rspec/core/rake_task'
5
5
 
6
- Echoe.new('jquery_datepicker', '0.3.2') do |p|
6
+ Echoe.new('jquery_datepicker', '0.3.3') do |p|
7
7
  p.description = "View helper that allows to select dates from a calendar (using jQuery Ui plugin)"
8
8
  p.url = "http://github.com/albertopq/jquery_datepicker"
9
9
  p.author = "Alberto Pastor"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "jquery_datepicker"
5
- s.version = "0.3.2"
5
+ s.version = "0.3.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alberto Pastor"]
@@ -11,7 +11,7 @@ module JqueryDatepicker
11
11
  dp_options, tf_options = input_tag.split_options(options)
12
12
  tf_options[:value] = input_tag.format_date(tf_options[:value], String.new(dp_options[:dateFormat])) if tf_options.has_key?(:value) && dp_options.has_key?(:dateFormat)
13
13
  html = input_tag.to_input_field_tag("text", tf_options)
14
- html += javascript_tag("jQuery(document).ready(function(){$('##{input_tag.get_name_and_id["id"]}').datepicker(#{dp_options.to_json})});")
14
+ html += javascript_tag("jQuery(document).ready(function(){jQuery('##{input_tag.get_name_and_id["id"]}').datepicker(#{dp_options.to_json})});")
15
15
  html.html_safe
16
16
  end
17
17
 
@@ -27,7 +27,7 @@ end
27
27
 
28
28
  class JqueryDatepicker::InstanceTag < ActionView::Helpers::InstanceTag
29
29
 
30
- FORMAT_REPLACEMENTES = { "yy" => "%Y", "mm" => "%m", "dd" => "%d", "d" => "%-d", "m" => "%-m", "y" => "%y"}
30
+ FORMAT_REPLACEMENTES = { "yy" => "%Y", "mm" => "%m", "dd" => "%d", "d" => "%-d", "m" => "%-m", "y" => "%y", "M" => "%b"}
31
31
 
32
32
  # Extending ActionView::Helpers::InstanceTag module to make Rails build the name and id
33
33
  # Just returns the options before generate the HTML in order to use the same id and name (see to_input_field_tag mehtod)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery_datepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: '1.2'
56
56
  requirements: []
57
57
  rubyforge_project: jquery_datepicker
58
- rubygems_version: 1.8.10
58
+ rubygems_version: 1.8.6
59
59
  signing_key:
60
60
  specification_version: 3
61
61
  summary: View helper that allows to select dates from a calendar (using jQuery Ui