I'm trying to display a date from a custom field on a post (Date picker format). On a table refresh it displays the date correctly for a second, and the it changes every date to 8/23/1970.
Can you please make sure that the date format in wpDataTables' Settings is the same as the date format in the Date Picker?
Also, can you please access this entry in the database and check the column type of the database column - see if it's set to "DATE" or if it's "VARCHAR" or maybe even something else.
I have tried to adjust the Table display settings to match this, and it has no effect on the issue described below.
Turning off server-side processing has some effect - in that it displays the date correctly. However, the date does not sort correctly.
Displaying the date field as a string gets me a sortable number, but not formatted. For this use case, if there was someway for me to transform the string into something that looks like a date, that would be acceptable. Is this possible?
I'm afraid there are no functions in wpDataTables to format the string to look like a date.
Where are you adjusting the settings? You mentioned table display settings, but those are just display settings. The date format is configured in wpDataTables/Settings:
If you haven't, can you please try matching the format in here as well?
I'm trying to display a date from a custom field on a post (Date picker format). On a table refresh it displays the date correctly for a second, and the it changes every date to 8/23/1970.
Hello Andy.
Can you please make sure that the date format in wpDataTables' Settings is the same as the date format in the Date Picker?
Also, can you please access this entry in the database and check the column type of the database column - see if it's set to "DATE" or if it's "VARCHAR" or maybe even something else.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar -
The field is stored in the DB as Ymd.
I have tried to adjust the Table display settings to match this, and it has no effect on the issue described below.
Turning off server-side processing has some effect - in that it displays the date correctly. However, the date does not sort correctly.
Displaying the date field as a string gets me a sortable number, but not formatted. For this use case, if there was someway for me to transform the string into something that looks like a date, that would be acceptable. Is this possible?
Thanks,
Andy
Hello again Andy.
I'm afraid there are no functions in wpDataTables to format the string to look like a date.
Where are you adjusting the settings? You mentioned table display settings, but those are just display settings. The date format is configured in wpDataTables/Settings:
If you haven't, can you please try matching the format in here as well?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi - sorry that I misspoke. Yes, this is where I have adjusted the settings.
OK, Andy, can you then please provide me with temporary wp-admin (Administrator) user credentials in a PRIVATE response, so I can take a look?
Just make sure to tell me which table I should take a look at and on which page it's posted.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables