jDate Does Not Show Saved Date/Time when Record is Edited

eugenecjr

Member
I have a several jDate elements in my form and I do not have any issues selecting a date/time. After the record is saved I can see the dates and times in the list. However, if I open the same record to be edited the Date/Time is not visible in the element.

PHP 8.1.6
Joomla 3.10.9
MySQL 8.0.29
Fabrik - Updated from GitHub today (5/30/2022)

-Eugene
 
I can't replicate.
I can see issues with saving the jdate if the site (frontend) is not running with https. But in this case in e.g. Chrome you can't even log in.

Edit:
On my site with php8 (8.1.6) it won't save anything if it's not https, so not jdate related.
 
Last edited:
Not sure what to say: Here is the record displayed in the list:

upload_2022-5-31_21-39-13.png

Then if I click to edit that record:

upload_2022-5-31_21-39-53.png

Clearly see that Missed Clock-in is not displayed. If I click on the Calendar 'Icon' I would think it would load the date and time shown in the list however:

Shows current date and time:
upload_2022-5-31_21-41-20.png

Site is running https.

-Eugene
 
Ok, this seems to be different.
The field looks grayed out, what are your exact jdate settings?

Is it only in frontend or also in backend?
Any JS errors in your browser console? Did you try with different browsers?
Which Joomla template?
 
Being grayed out is due to not allowing typing. However, this does not change the results if on or off.

The issues exist for both the front and backend
The issue exist for both chrome and Edge
I see no JS errors just a message that jMigrate has been installed
The template is protostar

-Eugene
 
As I said: it's working on my php8 site.
Test with a simple list/form (only default id, jdate) etc.
 
Did has request and the results are exactly the same:

upload_2022-6-3_6-43-41.png
Brand new list/form with just one element added, jDate.

Enter a single record:

upload_2022-6-3_6-44-9.png

When I view the record I see:

upload_2022-6-3_6-44-33.png

-Eugene
 

Attachments

  • upload_2022-6-3_6-42-3.png
    upload_2022-6-3_6-42-3.png
    19.5 KB · Views: 34
No idea...
Is it the same with the old "date" element? (Attention, you can't mix date and jdate in one form)

Did you try with default settings? I can remember issues with "/" in date format (with old date element).
But it's also working with d/m/Y and 12h format on my site.
 
Last edited:
I believe I found what is causing the issue. After going through the changes I was making for my use of the jDate element, I did the changes one after I verified not making any changes at all and it was working. What I found is actually a change I did not need to make as the default formatting was doing the same thing, but not sure if this is something you would like to know to prevent what I just went through.

If you put in the following for the time format, g:i A, which is the default format with 24H turned off the time would not display even though I was able to input the date/time and verify it was saved into the database. Also viewable in the list. If you open the form, you do not see the date/time. After I removed this formatting the issue went away.

Maybe something you can replicate and then looking into the code see if it is just my format or all format changes that are causing this issue.

-Eugene
 
It seems to be a Windows problem, do you have a Windows server?
It's not replicatable on Linux (even with php8) but on my local server (Windows, php7) and in the jdate.php code I found
// NOTE - 't usedon 'g' (hours without leading 0) as it translates to %l, which won't work on Windows
for the default 12h setting.
Looks like 'a' has a similar issue.
So use the standard formats with :s if you need the seconds, otherwise leave blank.

'G' (should be 24h without leading 0) doesn't break but seems to be like 'H' on all systems.

There are some more issues with jdate (e.g. advanced search...)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top