input_calendar 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/example.html CHANGED
@@ -19,7 +19,7 @@ div { float:left; width:225px;}
19
19
 
20
20
  <div>
21
21
  <h1>Default</h1>
22
- <input type="text" value="2001-09-21" id="event_date" readonly>
22
+ <input type="text" value="2012-05-21" id="event_date" readonly>
23
23
  <script>
24
24
  Calendar.attach("event_date")
25
25
  </script>
@@ -27,7 +27,7 @@ div { float:left; width:225px;}
27
27
 
28
28
  <div>
29
29
  <h1>Custom text</h1>
30
- <input type="text" value="2001-09-21" id="event2_date" readonly>
30
+ <input type="text" value="2012-05-21" id="event2_date" readonly>
31
31
  <script>
32
32
  Calendar.attach("event2_date", {footer: "<strong>Due by:</strong> <%= month %> <%= day %>, <%= year %>"})
33
33
  </script>
@@ -1,3 +1,3 @@
1
1
  module InputCalendar
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/src/calendar.coffee CHANGED
@@ -80,7 +80,7 @@ class @Calendar
80
80
  date.setDate(1)
81
81
  month = @pager_date.getMonth()
82
82
  first_day = date.getDay()
83
- for i in [1..first_day]
83
+ while (first_day -= 1) > -1
84
84
  date.go_yesterday()
85
85
  html = ""
86
86
  i = 0
@@ -140,7 +140,7 @@
140
140
  date.setDate(1);
141
141
  month = this.pager_date.getMonth();
142
142
  first_day = date.getDay();
143
- for (i = 1; 1 <= first_day ? i <= first_day : i >= first_day; 1 <= first_day ? i++ : i--) {
143
+ while ((first_day -= 1) > -1) {
144
144
  date.go_yesterday();
145
145
  }
146
146
  html = "";
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Goebel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-24 00:00:00 Z
18
+ date: 2012-06-02 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Simple and clean JS calendar to enter dates on forms