0

I need to change the way the date displays on the front end, specifically in channel form date fields.

Currently it’s

18-2-16 2:11 PM 

I’d be OK with this if it just didn’t have the time displayed. It’s really unhelpful to have the time displayed here, and all of the users so far that have used the system we’ve built have been confused by this.

The field is asking for a date, but the current time is appended, unnecessarily.

Is there some way to change the field to display more like:

Wednesday, 3 February 2016 

or at least just remove the time?

Just to clarify I am not trying to use the date format output tag:

{my_date format=""} 

as this OUTPUTS the date only

I am trying to change the way the native date picker INSERTS the date to a channel form field.

Thanks.

0

The only way I know of doing this is to modify the jQuery init settings for the date-picker functionality. EE modifies their scripts to coincide with the EE date variable formatting. I guess you could open up your /themes/ee/asset/javascript/compressed/cp/date_picker.js file and at the end of line 46after the var n=EE.date.date_format;, you could add n="%l, %j %F %Y";. Keep in mind, I don't know what other ramifications this might cause. This formats the date/time object for that field though.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.