Custom Field 'Date' value not saving as yyyy-mm-dd

This topic contains 13 reply and 3 voices, and was last updated by Mahi 11 years ago
Viewing 13 Posts - 1 through 13 (of 13 total)
Author Posts
October 16, 2013 at 3:21 pm 9064
Mahi Hello, I'm trying to save a custom field date value as yyyy-mm-dd. WPUF Pro defaults to dd/mm/yy and I can't seem to change this. I can save yyyy-mm-dd as the date format in the backend form, but it still gets saved to the database as dd/mm/yy. Any help please? Thanks, Alex
October 16, 2013 at 3:24 pm 9065
Alex Alex

actually, it’s getting saved to the database as 10/26/2013 (mm/dd/yyyy).

October 16, 2013 at 3:59 pm 9066
Alex Alex

Update*to

When I set the date format to yy-mm-dd, the date appears the way I want it (2013-10-16) when I enter a date in the WPUF Custom Fields Meta Box from the backend post edit page.

However, from the front-end post edit, the date still gets formatted as 10/16/2013.

October 17, 2013 at 10:44 am 9107
Alex Alex

Seems like no matter what date format I set in the backend setting, WPUF formats the date as 10/16/2013 in the front end and saves it at that.

Anyone have any idea what’s going on here?

October 18, 2013 at 8:21 pm 9179
Mahi Mahi

@aburi

all you have to do set date format – yy/mm/dd

NOT – yy-mm-dd

October 18, 2013 at 10:22 pm 9191
Alex Alex

@mahi, Thanks for the reply.

That saves the date as “10/17/2013”, not “2013-10-12”, which is what I want.

I have a search from that searches by date and it works in the latter format, so I’m trying to get WPUF to save in that format.

Any other ideas?

October 21, 2013 at 8:44 am 9237
Alex Alex

Anybody any other ideas here? Still trying to figure this out.

October 27, 2013 at 10:15 pm 9484
hughs hughs

I am interested in an answer to this also. I want to use the Buddypress Profile Integration add-on for a dating site that has a date range search, but the documentation says that the date has to be input in a specific format. Buddypress default uses dd-month-yyyy.
This is key to my site success so any direction on whether this works or not would be appreciated. If I figure it out I will post the answer here.

October 28, 2013 at 5:52 am 9493
Mahi Mahi

@aburi – sorry for long delay! wondering have you found any solution on this?
perhaps @tareq can help you?


@hughs
– Buddypress default uses yyyy-month-dd not dd-month-yyyy :), thats why you have to configure that way. In standalone WPUF-pro you can use any format.

October 28, 2013 at 12:13 pm 9500
Alex Alex

thanks @Mahi for writing back.

Still looking for an answer to this. The main issue seems to be the front-end form saving the date as “mm/dd/yyyy″, not “yyyy-mm-dd″.

When I save the date in the WPUF custom field box from the back-end, it saves correctly as “yyyy-mm-dd”. So something with the front-end form going on here.

Any help would be great as each time someone creates a new post, I have to go in and re-edit their date from the backend.

Alex

November 4, 2013 at 12:36 am 9726
Alex Alex

Anyone have a moment to take a look at this – would appreciate it.

Alex

November 4, 2013 at 6:01 pm 9741
Mahi Mahi

Hello Alex,

Not sure why you are saying different way! But, i can see it saves yyyy-mm-dd or dd-mm-yyyy or whatever format you like !

It uses hash ( – ) not backslash (/) !
Or, i am missing something?

November 8, 2013 at 1:06 am 9844
Alex Alex

Turned out to be an issue with the datepicker js I was using with my twitter bootstrap. It was altering the date format somehow!

so fixed now…

alex

November 8, 2013 at 6:32 am 9853
Mahi Mahi

Thats good to know that issue been solved. Cheers.

Viewing 13 Posts - 1 through 13 (of 13 total)