DateTime Picker

When I pull up an existing event the start and end time boxes are both empty. I know this is not normal behavior because I have a second installation hosted by a 3rd party and when I pull up an existing event for it the date / times are set correctly in their respective fields.

What file of mine could be messed up that could be causing this? I have tweaked some things with the installation slighly, mostly design related though.

Which version are you using please?

1.8 has two linked fields, the date value is set in a hidden field and then populated into the picker via JavaScript in your local format (date format setting).

That sounds like what may be happening but I believe I am running release 1.7
Where is this script executed from? I am receiving no errors in the javascript console.

1.7 should fill in both fields (hidden and visible) before serving the content to the browser - can you confirm your date format is the standard one Y-m-d H:i ?

Yes it is standard. What javascript file handles this? I could check it out.

So, its pretty simple (I hope).

The html for the form is served via XHR - so you should see this in developer tools network tab. The response is json formatted and has a html property - the dates should be formatted in there already.

The javascript is in xibo-calendar.js and only initialises the date pickers based on the dates that are already there.

The form is rendered here:

This is very different in 1.8, so make sure you’re in the master branch

1 Like

Sorry for the late reply. I will take a look at this and see if I can fix my system. Thanks so much!

1 Like

Ok so after much debugging and checking of this I still cannot figure out how my system is different from the working one. I have a server that I am hosting and one that Xibo is hosting, they should be nearly identical but this is the only issue that I am having. Sadly none of my developer tools are throwing a javascript error. I check out any differences in the files you sent me and my own files and there were none.

Any suggestions?

my only suggestion is to comment out the datepicker initialisation in here:

and then see what you have in the fields and hidden fields - they should then be exactly as the XHR return call sets them.