Commit 5a1f2908291290df5067ffc2f79013cbfebfedfe

Authored by Daniela Feitosa
1 parent e579c815

Added datepicker on steps

(ActionItem2837)
plugins/community_track/public/icons/calendar.png 0 → 100644

604 Bytes

plugins/community_track/public/style.css
... ... @@ -193,3 +193,9 @@
193 193 .community-track textarea {
194 194 width: 100%;
195 195 }
  196 +
  197 +.formfield input#datepicker-from-date,
  198 +.formfield input#datepicker-to-date {
  199 + width: 115px;
  200 + background: url(/plugins/community_track/icons/calendar.png) right center no-repeat;
  201 +}
... ...
plugins/community_track/views/cms/community_track_plugin/_step.rhtml
... ... @@ -4,8 +4,14 @@
4 4  
5 5 <div>
6 6 <%= required f.text_field('name', :size => '64', :maxlength => 150) %>
7   - <%= labelled_form_field(_('Start date'), pick_date(:article, :start_date)) %>
8   - <%= labelled_form_field(_('End date'), pick_date(:article, :end_date)) %>
  7 + <%= labelled_form_field(_('Period'), (
  8 + date_range_field('article[start_date]', 'article[end_date]', @article.start_date, @article.end_date,
  9 + '%Y-%m-%d',
  10 + { :change_month => true, :change_year => true,
  11 + :date_format => 'yy-mm-dd' },
  12 + { :size => 14 })
  13 + )) %>
  14 +
9 15 </div>
10 16  
11 17 <%= labelled_form_field check_box(:article, :hidden) + _('Hidden Step'), '' %>
... ...