statamic / workshop

Create and edit entries, pages, and globals on the front-end of your site without the control panel.
https://statamic.com/marketplace/addons/workshop
3 stars 2 forks source link

Timestamps lost on Workshop:entry:create #5

Open danielfowler opened 8 years ago

danielfowler commented 8 years ago

Every time I setup a new Workshop:entry:create dealio, my dates save just fine, but the times do not. I do have order: date in my folder.yaml and I have tried formatting the date/time in several ways, always within a single field. The result is a filename like 2018-10-30.title-of-show.md (the start time is dropped).

Saving an entry (with date and time) in the CP yields the correct result.

Here's one of my Workshop forms. I used Statamic 2.1.2 and 2.1.6.

{{ workshop:entry:create collection="shows" attr="id:create_show" }}
  {{ if success }}
    <div class="green row window">
      <div><strong>Show created</strong></div>
    </div>
  {{ /if }}
  <fieldset class="show_section">
    <legend>Show Information</legend>
    <div>
      <label for="for_title">Title of Show</label>
      <input id="for_title" name="title" placeholder="title of show" type="text">
    </div>
    <div>
      <label for="for_date">Opening Night</label>
      <input id="for_date" name="date" value="{{ now modify_date="+2 months" format="Y-m-d" }} 7:30 PM" type="text">
    </div>
  </fieldset>
  <button class="large green btn">Submit</button>
{{ /workshop:entry:create }}