Home Forums Plugin Support WP User Frontend (Free Version) Custom Field 'Date' value not saving as yyyy-mm-dd

This topic is: resolved

Tagged: 

This topic contains 13 replies, has 3 voices, and was last updated by  Mahi 5 years, 4 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #9064

    Alex
    Participant
    Post count: 27

    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

    #9065

    Alex
    Participant
    Post count: 27

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

    #9066

    Alex
    Participant
    Post count: 27

    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.

    #9107

    Alex
    Participant
    Post count: 27

    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?

    #9179

    Mahi
    Member
    Post count: 1555

    @aburi

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

    NOT – yy-mm-dd

    #9191

    Alex
    Participant
    Post count: 27

    @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?

    #9237

    Alex
    Participant
    Post count: 27

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

    #9484

    hughs
    Participant
    Post count: 42

    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.

    #9493

    Mahi
    Member
    Post count: 1555

    @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.

    #9500

    Alex
    Participant
    Post count: 27

    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

    #9726

    Alex
    Participant
    Post count: 27

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

    Alex

    #9741

    Mahi
    Member
    Post count: 1555

    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?

    #9844

    Alex
    Participant
    Post count: 27

    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

    #9853

    Mahi
    Member
    Post count: 1555

    Thats good to know that issue been solved. Cheers.

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘Custom Field 'Date' value not saving as yyyy-mm-dd’ is closed to new replies.