simple-form-datepicker 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6fe91099060ffc32a27ada519feab8b4b8493e7
4
- data.tar.gz: 5aa10c32f4070f1b57ec0aa40b31a5e306b5436d
3
+ metadata.gz: edd55597aa50698a280c64565349c5d1aa7e0e69
4
+ data.tar.gz: 77e22198759b6cd15f41d26372cb82ecac4873dd
5
5
  SHA512:
6
- metadata.gz: cc36b39695b48a340f7c7956f08a6c042819ddd2987d988404938eaf0b7d56860cb456bc0bfa5999a48dd05924c1b5c7574a64fa991c3a5d0a52dcd50373eeac
7
- data.tar.gz: b1ca272191116046ef860836d8aa88d007c927ae89e51474569cb6338dd6fef5345f1d9ad42e01a7f57f9f7dfb341442fb1a999d9b6cdfd3adddda0516d144c9
6
+ metadata.gz: 69e892e8bc1b6f067fdad710bb19940b39a884aaa1caa68a8ebbda3b601164662bb9f074b3045e3fb2bd1c22bf3f6f88bfce051aed094250d269c84c9ed30301
7
+ data.tar.gz: 9b0112906236a128f83a3f9ba48e529cda85d5c1dd1c22b6c010f86782e18024a55adbab950aeff62f59a0ed07b30a33488c382aa4b1e83e635aa51b67b68313
@@ -1,6 +1,6 @@
1
1
  require 'simple-form-datepicker/version'
2
2
 
3
- module SimleFormDatepicker
3
+ module SimpleFormDatepicker
4
4
  end
5
5
 
6
6
  require 'simple_form'
@@ -11,6 +11,8 @@ require 'simple_form'
11
11
  # Works well with JQueryUI's datepicker and I18n.
12
12
  #
13
13
  class DatepickerInput < SimpleForm::Inputs::StringInput
14
+ # Builds options for the dateicker input, sets it's value using
15
+ # Rails's date format and adds behaviour: 'datepicker' to its date-atrributes.
14
16
  def input_html_options
15
17
  value = object.send(attribute_name)
16
18
  options = {
@@ -21,10 +23,12 @@ class DatepickerInput < SimpleForm::Inputs::StringInput
21
23
  super.merge options
22
24
  end
23
25
 
26
+ # Adds the "datepicker" class to the input element
24
27
  def input_html_classes
25
28
  super.push('datepicker')
26
29
  end
27
30
 
31
+ # Builds the input text field and an hidden field with class attribute_name-alt
28
32
  def input
29
33
  @builder.text_field(attribute_name, input_html_options) + \
30
34
  @builder.hidden_field(attribute_name, value: input_html_options[:value], class: attribute_name.to_s + "-alt")
@@ -1,4 +1,4 @@
1
1
  module SimpleFormDatepicker
2
2
  # simple-form-datepicker version
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-form-datepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul d'Hubert