Body: <p>For a specific kind of entry I need the time in a date/time field to either automatically display as 23:00/11pm on the user dashboard, or, permanently set the time on that date/time field to 23:00/11pm.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-11T08:15:59.083Z
Comments.Text: So, you want that field to have 11pm as default value if nothing was set?
Comments.UserDisplayName: Johannes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-12T18:34:04.553Z
Comments.Text: @Johannes Yes, exactly :)
Comments.UserDisplayName: JJefferyDev
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T10:07:32.230Z
Comments.Text: Maybe you can use this plugin: `doublesecretagency/craft-cpjs`. Then target your field and change its value on load using JavaScript. Not the cleanest, but probably the easiest.
Comments.UserDisplayName: Romain P.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T21:07:18.630Z
Comments.Text: Yes, you could do this by injecting JS and manipulate the `<input>` or by writing a custom module that modifies the value. Do you need further advice on that?
Comments.UserDisplayName: Johannes
Tags: <craft3><datetime>
Title: How to automatically set time in a date/time field?
ThreadText: # How to automatically set time in a date/time field?
  
  (Asked by: username_0 on 2020-06-11)
  
  For a specific kind of entry I need the time in a date/time field to either automatically display as 23:00/11pm on the user dashboard, or, permanently set the time on that date/time field to 23:00/11pm.
  
  **Tags:** craft3, datetime
  
  > **Comments:**
  > **username_1**: So, you want that field to have 11pm as default value if nothing was set?  
  > **username_0**: @username_1 Yes, exactly :)  
  > **username_2**: Maybe you can use this plugin: `doublesecretagency/craft-cpjs`. Then target your field and change its value on load using JavaScript. Not the cleanest, but probably the easiest.  
  > **username_1**: Yes, you could do this by injecting JS and manipulate the `<input>` or by writing a custom module that modifies the value. Do you need further advice on that?  
  
  ---
  
  ## 0 answers
  
  