Today's date field?

This topic contains 8 replies, has 4 voices, and was last updated by  Nigel Hancock 4 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #491789

    Nigel Hancock
    Expired Member
    Post count: 83

    I need to add a field which is “date modified” which is then the default sort order. I don’t think this is a native options so, I’ve added a field “Date modified” and I would like to auto-populate it with today’s date, not sure that’s even possible and, if not, I’ll have to use manual entry BUT if I do that, I want to limit the options to select only today’s date. I’ve been playing with the “Date Range” which I presume conforms to PHP syntax but can’t make it stick – that is, I enter, say, d+1:d-1 in the date range field, save it, but then it gets stripped out so I presume I’m suing the wrong syntax.

    Can anyone advise what the correct syntax should be for today’s date only please?

    Many thanks,

    #491824

    Kor
    Moderator
    Post count: 16516

    Hi Nigel Hancock,

    Thanks for your post. You can sort by the creation date of the listings following the instructions here https://wpgeodirectory.com/docs-v2/places/sorting/ .But, there isn’t an option that allows you to sort with “date modified”.

    #491888

    Nigel Hancock
    Expired Member
    Post count: 83

    That’s what I guessed Kor but the real question was about the syntax for the date range option in a date field in order to restrict input to today’s date only. I can’t find any documentation on that?

    #491948

    Alex Rollin
    Moderator
    Post count: 27815

    I will flag your topic for the developers who will comment if there is a workaround.

    #491957

    Nigel Hancock
    Expired Member
    Post count: 83

    Alex,

    It’s not so much a workaround I need (although it would be good) right now I need to know the syntax for the date range option in a date field. The tooltip makes suggestions but I can’t get these to work in any way or even remain saved?

    #491975

    Kiran
    Moderator
    Post count: 7069

    Hi Nigel,

    Without customization, it is not possible to achieve things you asking. It requires some customization to to display field in form and to validate during sorting.

    Thanks,
    Kiran

    #491986

    Nigel Hancock
    Expired Member
    Post count: 83

    Arggghh! Please, maybe I’m not making sense …

    There is a Date field I’ve added to a CPT.

    In that date field is a field marked “Date range” (see attached screenshot).

    I need to know the syntax/format for adding something in this field, maybe a date range, that’s all.

    #491995

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #492008

    Nigel Hancock
    Expired Member
    Post count: 83

    Ah! I’m sorry too 🙂

    ok so I’ll link to a video of what I now think is a bug …

    https://grassmediaweb.com/downloads/dateRangeproblem.mov

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket