Answers.Body: <p>I suspect it might be your values. Try testing with this hard coded in and see if it works:</p>
  
  <pre><code>&lt;input type="hidden" id="endDate" name="fields[endDate][date]" value="12/30/2017" /&gt;
  &lt;input type="hidden" id="endTime" name="fields[endDate][time]" value="2:15 AM" /&gt;
  </code></pre>
  
  <p>I always reference what's on this <a href="https://straightupcraft.com/articles/craft-cms-field-guide-twig?view=input" rel="nofollow noreferrer">StraightUpCraft</a> guide, and I try to be as <em>exact</em> as possible to the examples. You can also just inspect date fields inside a saved entry in the CMS to see what the values look like and mimic that on the front end.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-05T02:41:43.967Z
Answers.LastActivityDate: 2017-10-05T02:41:43.967Z
Answers.UserDisplayName: Ryan
Answers.Body: <p>I recently did this using a field called <code>expirDate</code>:</p>
  
  <p><code>&lt;input type="date" name="expiryDate" id="expiryDate" class="form-control"&gt;</code></p>
  
  <p>Can you give that a try?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T14:11:58.500Z
Answers.Text: How do you set value?
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T14:12:32.310Z
Answers.Text: I can't rely on a date field type unfortunately as browser support is still spotty, and it wouldn't allow me to select the time either.
Answers.UserDisplayName: Matt Wilcox
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T13:58:06.713Z
Answers.LastActivityDate: 2017-07-06T13:58:06.713Z
Answers.UserDisplayName: Jan Henckens
Body: <p>There are a number of answers on this forum for getting a front-end form to have a DateTime field that splits date and time into separate fields; It's not working for me.</p>
  
  <p>If I strip back to absolute basics - hardcoded, as a test:</p>
  
  <p><code>&lt;input type="hidden" id="endDate" name="fields[endDate]" value="2017-12-30 02:15:00" /&gt;</code></p>
  
  <p>Works, and a date &amp; time is stored in the back-end field, displaying correctly.</p>
  
  <p>But, if I try to split it so the date and time fields are separate (so that I can use a date picker on one and a select drop down on the other) - it doesn't save a value into the field. Even stripped back to hard-coded hidden fields...</p>
  
  <p><code>&lt;input type="hidden" id="endDate" name="fields[endDate][date]" value="2017-12-30" /&gt;</code></p>
  
  <p><code>&lt;input type="hidden" id="endTime" name="fields[endDate][time]" value="02:15:00" /&gt;</code></p>
  
  <p>What am I doing wrong? The is the same format that works in the Craft back-end...</p>
  
Tags: <form>
Title: front end date field format doesn't work? fields[dateField][date]
ThreadText: # front end date field format doesn't work? fields[dateField][date]
  
  (Asked by: username_0 on 2017-07-06)
  
  There are a number of answers on this forum for getting a front-end form to have a DateTime field that splits date and time into separate fields; It's not working for me.
  
  If I strip back to absolute basics - hardcoded, as a test:
  
  `<input type="hidden" id="endDate" name="fields[endDate]" value="2017-12-30 02:15:00" />`
  
  Works, and a date & time is stored in the back-end field, displaying correctly.
  
  But, if I try to split it so the date and time fields are separate (so that I can use a date picker on one and a select drop down on the other) - it doesn't save a value into the field. Even stripped back to hard-coded hidden fields...
  
  `<input type="hidden" id="endDate" name="fields[endDate][date]" value="2017-12-30" />`
  
  `<input type="hidden" id="endTime" name="fields[endDate][time]" value="02:15:00" />`
  
  What am I doing wrong? The is the same format that works in the Craft back-end...
  
  **Tags:** form
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-10-05. Score: 1
  
  I suspect it might be your values. Try testing with this hard coded in and see if it works:
  
  ```
  <input type="hidden" id="endDate" name="fields[endDate][date]" value="12/30/2017" />
  <input type="hidden" id="endTime" name="fields[endDate][time]" value="2:15 AM" />
  
  ```
  
  I always reference what's on this [StraightUpCraft](https://straightupcraft.com/articles/craft-cms-field-guide-twig?view=input) guide, and I try to be as *exact* as possible to the examples. You can also just inspect date fields inside a saved entry in the CMS to see what the values look like and mimic that on the front end.
  
  
  ---
  
  ### Answer by username_2 on 2017-07-06. Score: 0
  
  I recently did this using a field called `expirDate`:
  
  `<input type="date" name="expiryDate" id="expiryDate" class="form-control">`
  
  Can you give that a try?
  
  > **Comments:**
  > **username_3**: How do you set value?  
  > **username_0**: I can't rely on a date field type unfortunately as browser support is still spotty, and it wouldn't allow me to select the time either.  
  
  ---
  
  