<commit_before><%= form_for(@event) do |f| %>
  <% if @event.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>

      <ul>
      <% @event.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field form-group">
    <%= f.date_picker :date %>
    <% if @event.date.present? %>
    <em><%= I18n.l(@event.date) %></em><br/>
    <code><%= @event.date.to_s %></code>
    <% end %>
  </div>
  
  <div class="field form-group">
    <%= f.datetime_picker :datetime %>
    <% if @event.datetime.present? %>
    <em><%= I18n.l(@event.datetime) %></em><br/>
    <code><%= @event.datetime.to_s %></code>
    <% end %>
  </div>
  
  <div class="field form-group">
    <%= f.time_picker :time %>
    <% if @event.time.present? %>
    <em><%= I18n.l(@event.time, format: :only_time) %></em><br/>
    <code><%= @event.time.to_s %></code>
    <% end %>
  </div>
  
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %><commit_msg>Add min and max to generic form<commit_after><%= form_for(@event) do |f| %>
  <% if @event.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>

      <ul>
      <% @event.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="field form-group">
    <%= f.date_picker :date, min: Date.today - 4.days, max: Date.today + 4.days %>
    <% if @event.date.present? %>
    <em><%= I18n.l(@event.date) %></em><br/>
    <code><%= @event.date.to_s %></code>
    <% end %>
  </div>
  
  <div class="field form-group">
    <%= f.datetime_picker :datetime, min: DateTime.now - 4.days, max: DateTime.now + 4.days  %>
    <% if @event.datetime.present? %>
    <em><%= I18n.l(@event.datetime) %></em><br/>
    <code><%= @event.datetime.to_s %></code>
    <% end %>
  </div>
  
  <div class="field form-group">
    <%= f.time_picker :time %>
    <% if @event.time.present? %>
    <em><%= I18n.l(@event.time, format: :only_time) %></em><br/>
    <code><%= @event.time.to_s %></code>
    <% end %>
  </div>
  
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.24658703071672355, 'fraction_numerical': 0.008532423208191127, 'mean_word_length': 2.6929133858267718, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5520848', 'n_tokens_mistral': 988, 'n_tokens_neox': 888, 'n_words': 178}