date_picker 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/date_picker/form_tag_helper.rb +6 -1
  3. data/lib/date_picker/styles/bootstrap.rb +2 -2
  4. data/lib/date_picker/version.rb +1 -1
  5. data/test/dummy/app/models/event.rb +7 -0
  6. data/test/dummy/bower.json +0 -1
  7. data/test/dummy/config/application.rb +2 -1
  8. data/test/dummy/db/development.sqlite3 +0 -0
  9. data/test/dummy/log/development.log +560 -0
  10. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/-OQAivyOU9P9ZAQ_y2trK_-N68_KZTTs-DggI7rEtV0.cache +2 -0
  11. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2ANZSFEU9Y8883vrveeHrMkljTbZDFZjWodiOw-4_Mc.cache +2 -0
  12. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/2ue6fqDvMQFxbulk_l8s1sfDI8JjKBcOeZPftypE6Pc.cache +1 -0
  13. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/38E_4_y76yBlQpE8HJjOah6zDJCC-wqH4mcQaK0UL9c.cache +1 -0
  14. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/555Va3PB92_a2AQmwxFqDpppNN98rCJfaTXNrtIvQlY.cache +0 -0
  15. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/58Va14-8g080EO7U8YxBrWxWH0Qr8gn3BLdPS-zKsuk.cache +0 -0
  16. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/66sWxMCCzRVWUujKumZwet2XyEhSst8zigZDeKxtz7k.cache +1 -0
  17. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6c8RqN_iKGxrlpU9kmE4piMTyi6YveDs403lDEvCZEI.cache +0 -0
  18. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7uHMi2DhIqL4sozu3L9KdTIh4qRh4kDwTw8wIo2k9us.cache +0 -0
  19. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/A9UKKgpcQS_bV-aMc8rD1Qu8hPTSpihdwdy-ejQb0mA.cache +1 -0
  20. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Aclgag9GTw3jn13itmrL8vGzg189879Cdb1CxBM8YXg.cache +2 -0
  21. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/AzapYGohYHvX-jGdH6tgXcVgeKqRJ9dJ9pvMvuYpNMo.cache +0 -0
  22. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/B5lIcQ9vf5wgTus70iuvWxkAE_xESV27FLK_iDtI0EY.cache +1 -0
  23. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/BqHQMAB-ELafPl_sMF5n9fy9J9ZNOMc5DOqf8_tL-OQ.cache +0 -0
  24. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/F4upoYy8YAs33dZYFwekywdF6bmiPbQZPwIk2ArDTXE.cache +0 -0
  25. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JMJFOO2mH2xI-0hAy-EeYA23aHL1S4-icXLuzYrodzc.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JetsuzQv5yb-T0l2WvKI3GvbQ_nDU0ECMYnfRliFnno.cache +1 -0
  27. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/K0-51T1-fiBjKvLPRPmIVnr2IcC6uTZ2qlg4zXUzm20.cache +0 -0
  28. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/KlxUfYmC26KA405DB037sh4a34cPerHlhTqiPUphgQ0.cache +2 -0
  29. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/LHGKiqiXX4pIWAWw0cCT3qjAfEvhqHZXmCX_7Nz1OCM.cache +0 -0
  30. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/LmUmswBXcM1QeLiJ2p2G9gNRj39Cl_rJ7ozkvtiab4I.cache +1 -0
  31. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/MXIq1eBOfj1ueMAr8iJUuiPw5HBe9WFMxE0Oi_bQ8Yg.cache +1 -0
  32. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/N5AQcrKLar_U5rSRr0DAtN8_a9YMaZJT-hU6qw-lTAw.cache +9 -0
  33. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NSXZAot11kWgUqAWk28pHk3Wk0HJu27z4eYUbkZuqa0.cache +0 -0
  34. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/NXcLQLxrGRQoxi2WB4es6tt4iPz2E06Dj7gEXSj5zkQ.cache +1 -0
  35. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OELa8fL_6NiJFnO0qYfrT-FIojPLG8gS3TZtocTkHZc.cache +0 -0
  36. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OWyC9BF-hDFFyj0SikiKkaX_39O4TvVsT3QxmdjtK-0.cache +2 -0
  37. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QTXtB-rs9ebieZrqsw98wERUd5h9W7HvjMq8PGAGoxA.cache +0 -0
  38. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/QdZ0Ei6ZlU9XbmrTWqH1ooq60iXZh7XQ4vaTe01xz5I.cache +1 -0
  39. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SUmt0T4xyK4cJt4FK6hLg1DVCEfL1oBFbpR_Fn8LFb4.cache +0 -0
  40. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Sf579fo1XrM5H_gkUQC8Q5sJeXbGcz38F9wO78RwCjQ.cache +1 -0
  41. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WUgBJoBGEucS48X8sj4JFo_l7MQRgLr3ZHeY1EY8iOY.cache +0 -0
  42. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WyEseCj1JAct7Zy1iS4fTBqDwEHnAFYXoobmpq4NU4Y.cache +0 -0
  43. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/XkWj0epqQjwcDQkUhpPEz9Ws-W5NjhmrcvutlMBmHS8.cache +1 -0
  44. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YAOvP7ZFCuCxaRQHkCrW5logCs-229Fyj9xDcW53aWA.cache +2 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YVP4hjoeo9cOxkA-So_iF85TP_hajWWmr4381I3bhvo.cache +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YwMkInig25fMRiXbu4BMLn9839e0KsnGMPjdn_UHowc.cache +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ZSqknXg6zfmOsfnNU_VBlVZpVdYqxcWJ4iRtcH2bUXA.cache +1 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/_-dZnwSCjdWeA_hXdtRWU5Pem1vxMOpDEVJKYTincTs.cache +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/aOYS3w0KCfX6uoINv4VE1fD7iwwKxMjH12073qKxbGY.cache +1 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bRnLCEIiUFbWSQW7D5OOeIv_MdP73gGzfZV2rMs0rt4.cache +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bss5BE7NeR_7AJVJ1J87vPj-gBXbcmSKSjZc9ruG3aY.cache +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bui4vYOiOA_Xv3iHJUOI6M2Asla4_CfTUwvH8EP0ALQ.cache +2 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/cY96L-sEcUMqUsjeCOIRE5eZ-912i_ftgvvugaPCcZ4.cache +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/deAn4dZCHtEdTP1ffOcaA1jCNfkmkSizVKOD421MFbM.cache +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/h0p5bxXYrn5lWZ_jaG5xzx5H_JWGcpOE-AqpcQ1yqaA.cache +2 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/hcn-zg5FtPDGrWaj2CHNLt-Mt7Nb0AFKBWM3T7NCh3o.cache +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/hodd-s_Rz80YNWqb_ziDSgKRK3ov2d3vqWlF-PLY6vk.cache +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jHdCk5kG0rOdll4zcjjPd0pPGU9PzUBE2MfLU83G8QU.cache +9 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jafUaM18fOh5BfsBbH2zLPvXuHZqo89o72OD7MuqgwA.cache +1 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kSNzc3dJCBL5eUTJXtSzMHAmYf5YShtOyZ5wDGja9-w.cache +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kYtB6gWmJ9wG5dj9L6r3vfOldAtcIO5kgZ09DAWf2gg.cache +2 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nLlJmM1IJrQP1NYweF8MBUn3V5zj5QpCq4c7lnii_gU.cache +1 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ppnKh8HHcBF-WYFo8P3ZMgrVUoT48OihA9pRcdnSUJ4.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/q7jAL_JEbPHXEtzTVG46_HiU6LeX1cTqLs4zyVkOBhw.cache +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/r0hTIia-ZeuKklUR5a9zlc0z_o6Z4__a4fG7WNLUd4U.cache +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/r7WA4ETigY4fGAmUQ8PSPHqtCXooDqOidNtjsWTbP4E.cache +1 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/t7d1xK96yF7Qk1_XrkFpkeQY3MieEHdNsohdRO2cZSI.cache +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tBOQQXF_7FhywD-fijv2QCflxLm4xcMy9EOBVHMoXlI.cache +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tLiIOUHwpYwWc8zthL_sI_78QZJvS5eDNTa4uRt6Gic.cache +2 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ugfJlMXXQWf2uapF0DqywRxrQSvbmAkOD6pttYDbWBI.cache +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/v4xqfjzrUzZW5a6FzNYiez0yDf75GgHq1jr-pBhqedo.cache +1 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vP9vcm3n4AlQADvK2eFkPmgM4BIrrGugd1FjDp09HOI.cache +1 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vu4iDwUcLG80tLkdb6wYP9qryIQR-3AQJGEcDugALV8.cache +1 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/w4SAbXtkx1wTaR9hFnRex0F5fpypGeDnsp8cGP7ByCM.cache +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/wkgELuOuckRcA4pZ90TJBfB85KQpciJrtO6aDSUY2rU.cache +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xlacmyhLXW_PnX4fE3jc2qkszqeYtkHNN1o22-s_xLs.cache +1 -0
  77. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/CONTRIBUTING.md +5 -0
  78. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/README.md +11 -6
  79. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/bower.json +3 -6
  80. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css +7 -1
  81. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css +7 -1
  82. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js +4 -2
  83. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/component.json +3 -3
  84. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/composer.json +2 -5
  85. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/package.json +9 -1
  86. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +440 -64
  87. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less +9 -1
  88. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less +3 -3
  89. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec +2 -2
  90. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.nuspec +1 -1
  91. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +343 -0
  92. data/test/dummy/vendor/assets/components/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
  93. metadata +140 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caa4b0eba3cacf7a3a72cb27e394033a85be8358
4
- data.tar.gz: 4fb84b783d2a013b4d4f23b34479d39d0083f5cb
3
+ metadata.gz: 8c40ea21533eb2e4444b52cb4e0cfa932c156cc0
4
+ data.tar.gz: 28366f171ef15da86eb93e5be78e7b0f346ead3b
5
5
  SHA512:
6
- metadata.gz: 27250c963f03d51744668c8114e723b3a5e6d1d66b401eca319466552914b12a6a2e1fb6584f40e5d2c89f1cc4c16cef56dfbe2c3a5e5ada767321b038223ce2
7
- data.tar.gz: 74d92ae46d2c691ac5644b967157fb08f79760314987e4fbc3ca99f2084acdcc5c4fc86063874a9892692c1c9ef31d5d9f33400c7df2529f8d7ce682e68db5a7
6
+ metadata.gz: de10065d0598bfb401f15d94eb514e5a4180ab3d8e044821b34a40c1c33dea664ec651ddf268437af915b1ead10dbe46d8e34c9d5e3a20c69e49e5dfba7b24e3
7
+ data.tar.gz: a64616062f28b76d59ba1668dcc95d2efe9617ca5e74de692536c135c7ad20f37142a96c87f7038c30d0e07e008b2401bf52e2f1473d8db701666ddf51a65c48
@@ -23,11 +23,13 @@ module DatePicker
23
23
  end
24
24
 
25
25
  # Get Type format if not specified
26
+ format = nil
26
27
  if options[:format].present?
27
28
  format = options[:format]
28
- else
29
+ elsif DatePicker.config.formats.present?
29
30
  format = DatePicker.config.formats[type]
30
31
  end
32
+
31
33
  if format.blank? || !format.is_a?(String)
32
34
  case type
33
35
  when :date
@@ -52,6 +54,9 @@ module DatePicker
52
54
  style = :bootstrap
53
55
  end
54
56
 
57
+
58
+
59
+
55
60
  path = File.join(File.dirname(__FILE__), "styles", style.to_s)
56
61
 
57
62
  require path
@@ -15,7 +15,7 @@ module DatePicker
15
15
  def template()
16
16
  %{
17
17
  <div id="<%= input_id %>_container" class="input-group">
18
- <div class="input-group-addon">
18
+ <div class="input-group-addon" style="cursor: pointer">
19
19
  <span class="glyphicon glyphicon-calendar"></span>
20
20
  </div>
21
21
  <%= input_html %>
@@ -30,7 +30,7 @@ module DatePicker
30
30
  .on('dp.change', function(e) {
31
31
  $('#<%= input_id %>_hidden').val(e.date.format('<%= data_format %>'));
32
32
  }).data('DateTimePicker');
33
- <% if time %> datepicker.date(moment.utc(new Date(<%= time %>))); <% end %>
33
+ <% if time %> datepicker.date(moment(new Date(<%= time %>))); <% end %>
34
34
  })();
35
35
  </script>
36
36
  }
@@ -1,3 +1,3 @@
1
1
  module DatePicker
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,2 +1,9 @@
1
1
  class Event < ActiveRecord::Base
2
+ after_initialize :init_event
3
+
4
+ def init_event
5
+ self.date||= Date.tomorrow
6
+ self.time||= Time.now + 1.hour
7
+ end
8
+
2
9
  end
@@ -14,7 +14,6 @@
14
14
  "tests"
15
15
  ],
16
16
  "dependencies": {
17
- "eonasdan-bootstrap-datetimepicker": "~4.7.14",
18
17
  "jquery-ui": "~1.11.4",
19
18
  "bootstrap": "~3.3.4"
20
19
  }
@@ -17,7 +17,8 @@ module Dummy
17
17
 
18
18
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
20
+ config.i18n.default_locale = :de
21
+ config.time_zone = 'Berlin'
21
22
 
22
23
  # Do not swallow errors in after_commit/after_rollback callbacks.
23
24
  config.active_record.raise_in_transactional_callbacks = true
Binary file