input_calendar 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module InputCalendar
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/src/calendar.coffee CHANGED
@@ -112,7 +112,7 @@ class @Calendar
112
112
  o=$(event.target)
113
113
  o=o.children("A") if o[0].tagName=="TD"
114
114
  args = o.data("date").split("-")
115
- @date = new Date(args...)
115
+ @date = new Date(args[0], args[1], args[2])
116
116
  # stuff the raw value in the value field
117
117
  @field.val(o.data("date"))
118
118
  @element.find(".selected").removeClass "selected"
@@ -196,11 +196,7 @@
196
196
  o = o.children("A");
197
197
  }
198
198
  args = o.data("date").split("-");
199
- this.date = (function(func, args, ctor) {
200
- ctor.prototype = func.prototype;
201
- var child = new ctor, result = func.apply(child, args), t = typeof result;
202
- return t == "object" || t == "function" ? result || child : child;
203
- })(Date, args, function(){});
199
+ this.date = new Date(args[0], args[1], args[2]);
204
200
  this.field.val(o.data("date"));
205
201
  this.element.find(".selected").removeClass("selected");
206
202
  o.parent().addClass("selected");
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: input_calendar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Goebel