<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+ * Bugfix: don't include the :image option in the input field
+
 == Version 1.14
  * Added support for Rails 2.3
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -96,7 +96,7 @@ module CalendarDateSelect::FormHelpers
   # 
   #   &lt;%= calendar_date_select_tag &quot;event_demo&quot;, &quot;&quot;, :after_navigate =&gt; &quot;alert('The current selected month is ' + this.calendar_date_select.selected_date.getMonth());&quot; ,
   def calendar_date_select_tag( name, value = nil, options = {})
-    options, javascript_options = calendar_date_select_process_options(options)
+    image, options, javascript_options = calendar_date_select_process_options(options)
     value = CalendarDateSelect.format_time(value, javascript_options)
 
     javascript_options.delete(:format)
@@ -106,7 +106,7 @@ module CalendarDateSelect::FormHelpers
       hidden_field_tag(name, value, options) :
       text_field_tag(name, value, options)
 
-    calendar_date_select_output(tag, options, javascript_options)
+    calendar_date_select_output(tag, image, options, javascript_options)
   end
 
   # Similar to the difference between +text_field_tag+ and +text_field+, this method behaves like +text_field+
@@ -126,7 +126,7 @@ module CalendarDateSelect::FormHelpers
       use_time = false if Date===(obj.respond_to?(method) &amp;&amp; obj.send(method))
     end
 
-    options, javascript_options = calendar_date_select_process_options(options)
+    image, options, javascript_options = calendar_date_select_process_options(options)
 
     options[:value] ||=
       if(obj.respond_to?(method) &amp;&amp; obj.send(method).respond_to?(:strftime))
@@ -142,6 +142,7 @@ module CalendarDateSelect::FormHelpers
     tag = ActionView::Helpers::InstanceTag.new_with_backwards_compatibility(object, method, self, options.delete(:object))
     calendar_date_select_output(
       tag.to_input_field_tag( (javascript_options[:hidden] || javascript_options[:embedded]) ? &quot;hidden&quot; : &quot;text&quot;, options),
+      image,
       options,
       javascript_options
     )
@@ -151,6 +152,7 @@ module CalendarDateSelect::FormHelpers
     # extracts any options passed into calendar date select, appropriating them to either the Javascript call or the html tag.
     def calendar_date_select_process_options(options)
       options, javascript_options = CalendarDateSelect.default_options.merge(options), {}
+      image = options.delete(:image)
       callbacks = [:before_show, :before_close, :after_show, :after_close, :after_navigate]
       for key in [:time, :valid_date_check, :embedded, :buttons, :clear_button, :format, :year_range, :month_year, :popup, :hidden, :minute_interval] + callbacks
         javascript_options[key] = options.delete(key) if options.has_key?(key)
@@ -184,10 +186,10 @@ module CalendarDateSelect::FormHelpers
       end
 
       javascript_options[:year_range] = format_year_range(javascript_options[:year_range] || 10)
-      [options, javascript_options]
+      [image, options, javascript_options]
     end
 
-    def calendar_date_select_output(input, options = {}, javascript_options = {})
+    def calendar_date_select_output(input, image, options = {}, javascript_options = {})
       out = input
       if javascript_options[:embedded]
         uniq_id = &quot;cds_placeholder_#{(rand*100000).to_i}&quot;
@@ -196,7 +198,7 @@ module CalendarDateSelect::FormHelpers
         out &lt;&lt; javascript_tag(&quot;new CalendarDateSelect( $('#{uniq_id}').previous(), #{options_for_javascript(javascript_options)} ); &quot;)
       else
         out &lt;&lt; &quot; &quot;
-        out &lt;&lt; image_tag(options[:image],
+        out &lt;&lt; image_tag(image,
             :onclick =&gt; &quot;new CalendarDateSelect( $(this).previous(), #{options_for_javascript(javascript_options)} );&quot;,
             :style =&gt; 'border:0px; cursor:pointer;',
 			:class=&gt;'calendar_date_select_popup_icon')</diff>
      <filename>lib/calendar_date_select/form_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,6 +130,10 @@ describe CalendarDateSelect::FormHelpers do
   end
 
   describe &quot;calendar_date_select_tag&quot; do
+    before(:each) do
+      @time = Time.parse(&quot;January 2, 2007 12:01:23 AM&quot;)
+    end
+    
     it &quot;should use the string verbatim when provided&quot; do
       output = calendar_date_select_tag(:name, &quot;Some String&quot;)
 
@@ -137,25 +141,26 @@ describe CalendarDateSelect::FormHelpers do
     end
 
     it &quot;should not render the time when time is false (or nil)&quot; do
-      time = Time.parse(&quot;January 2, 2007 12:01:23 AM&quot;)
-      output = calendar_date_select_tag(:name, time, :time =&gt; false)
+      output = calendar_date_select_tag(:name, @time, :time =&gt; false)
 
       output.should_not match(/12:01 AM/)
-      output.should include(CalendarDateSelect.format_date(time.to_date))
+      output.should include(CalendarDateSelect.format_date(@time.to_date))
     end
 
     it &quot;should render the time when :time =&gt; true&quot; do
-      time = Time.parse(&quot;January 2, 2007 12:01:23 AM&quot;)
-      output = calendar_date_select_tag(:name, time, :time =&gt; true)
+      output = calendar_date_select_tag(:name, @time, :time =&gt; true)
 
-      output.should include(CalendarDateSelect.format_date(time))
+      output.should include(CalendarDateSelect.format_date(@time))
     end
 
     it &quot;should render the time when :time =&gt; 'mixed'&quot; do
-      time = Time.parse(&quot;January 2, 2007 12:01:23 AM&quot;)
-      output = calendar_date_select_tag(:name, time, :time =&gt; 'mixed')
-
-      output.should include(CalendarDateSelect.format_date(time))
+      output = calendar_date_select_tag(:name, @time, :time =&gt; 'mixed')
+      output.should include(CalendarDateSelect.format_date(@time))
+    end
+    
+    it &quot;not include the image option in the result input tag&quot; do
+      output = calendar_date_select_tag(:name, @time, :time =&gt; 'mixed')
+      output.should_not include(&quot;image=&quot;)
     end
   end
 end</diff>
      <filename>spec/calendar_date_select/form_helpers_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>137b830112e337b92b7ee4f304a0d95f6cd6d09c</id>
    </parent>
  </parents>
  <author>
    <name>Tim Harper</name>
    <email>timcharper@gmail.com</email>
  </author>
  <url>http://github.com/timcharper/calendar_date_select/commit/ad7d3cea6a7966b4590ed5f1abd99138ba1934e5</url>
  <id>ad7d3cea6a7966b4590ed5f1abd99138ba1934e5</id>
  <committed-date>2009-02-19T21:42:11-08:00</committed-date>
  <authored-date>2009-02-19T21:41:41-08:00</authored-date>
  <message>don't include the :image option in the input field</message>
  <tree>7f6ef206c62b5bd18a86fd056e122fe64d78d833</tree>
  <committer>
    <name>Tim Harper</name>
    <email>timcharper@gmail.com</email>
  </committer>
</commit>
