Sha256: 156f4d7175b5c8cecd0f4748ebd463a3f59c6aaf2eeefdcb71e1384f6b6cce6c

Contents?: true

Size: 1.33 KB

Versions: 6

Compression:

Stored size: 1.33 KB

Contents

<%
    time_val = comp.value ? comp.value.strftime("%Y-%m-%dT%H:%M:%S.%L") : nil
%>
<div id="<%= comp.id %>"
     class="mdc-text-field
            <%= 'mdc-text-field--with-trailing-icon' if comp.icon %>
            <%= 'mdc-text-field--fullwidth' if comp.full_width %>
            <%= 'is-invalid is-dirty' if comp.error %>">
  <%= erb :"components/icon", :locals => {comp: comp.icon, class_name: 'mdc-text-field__icon', parent_id: "#{comp.id}-input"} %>
  <input id="<%= comp.id %>-input"
         name="<%= comp.name %>"
         type="datetime-local"
         value="<%= time_val %>"
         class="mdc-text-field__input"
         aria-controls="<%= comp.id %>-input-helper-text"
         <%= 'required' if comp.required %>
         <%= 'invalid' if comp.error %>
         <%= "pattern='#{comp.pattern}'" if comp.pattern %>
         <%= 'readonly' if comp.readonly %>
         list="<%= comp.id %>-list"
         <%= erb :"components/event", :locals => {events: comp.events, parent_id:  "#{comp.id}-input"} %>>
  <label class='mdc-floating-label mdc-floating-label--float-above' for="<%= comp.id %>"><%= comp.label %></label>
  <div class="mdc-line-ripple"></div>
  <datalist id="<%= comp.id %>-list">
  </datalist>

</div>
<p id="<%= comp.id %>-input-helper-text" class="mdc-text-field-helper-text" aria-hidden="true">
  <%= comp.error || comp.hint %>
</p>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-0.1.5 views/mdc/components/date_time.erb
voom-presenters-0.1.4 views/mdc/components/date_time.erb
voom-presenters-0.1.3 views/mdc/components/date_time.erb
voom-presenters-0.1.2 views/mdc/components/date_time.erb
voom-presenters-0.1.1 views/mdc/components/date_time.erb
voom-presenters-0.1.0 views/mdc/components/date_time.erb