change date format of html 5 viewer
I've asked this in another thread and put a case to Latitude a week ago to no avail. I am pretty sure there is a simple solution to this but it is holding up the completion of my workflow. I have a display form that in the workflow shows the date format I want dd-mm-yyyy but in the viewer shows US format mm-dd-yyyy. It also creates data in the format dd-mm-yyyy but in the viewer shows the date created as mm-dd-yyyy.
I had a look at the mapping.json file in configuration on my test server and changed the format to dd-mm-yyyy however it still hasnt changed the date in my viewer.
0
-
Hi Sylvia
This worked for us.
Try: dd/MM/yyyy
Cheers
Chris0 -
hi Chris,
I made a typo in my post - I did have the format dd/MM/yyyy in my mapping.js file and it still remains in US format.
Is there a way to identify what location my html viewer config files are located? I ask as there seems to be a few directories on the test server that have the mapping.js file so I have changed them all, but wonder if I have missed one.0 -
Ah OK
I am not sure if this helps or not, but I have had issues in the past with changes made to the mapping.js file not being picked up by the browser (particuarly IE). I think its something to do with some internal caching or something. The only way round I found was to force those locale files to be reread on opening by adding to the shortened url, like below:
http://spatialwebapps.environment.sa.gov.au/naturemaps/?locale=en-us&viewer=naturemaps
Like I said not sure if this helps your situation, but it might be worth a try?0 -
thanks Chris
this format http://vrtarckew01.roads.vic.gov.au/Geocortex/Essentials/REST/sites/SPIDRE_TEST/?locale=en-us&viewers/SPIDRE_TEST_HTML/virtualdirectory/Resources/Config/Default
didn't seem to open my map service. I tried clearing my cache to no avail. However, I asked someone else to open the map service and they can see the attributes in the correct date format, but if they try to create a new point using my workflow, in the form it comes up with the US date.0 -
Have you tried changing the 'Data Time Zone' and 'Display Time Zone' under Site Info in Essentials Manager? 0 -
That was my next suggestion Lindsay ;-)
Also try this url format:
http://[YourServer]/[YourViewer]/Index.html?locale=en-US&configBase=http://[YourServer]/Geocortex/Essentials/[YourInstance]/REST/sites/[YourSite]/viewers/[YourViewer]/virtualdirectory/Resources/Config/Default0 -
Lindsay - I don't appear to have the option to change date/time under Site Info - I am using version 4.1 so perhaps that was implemented later. I am aware later versions allow you to change date/time format in field settings.
Chris that url works - however the form date picker and attributes still display US date format
not sure how to alter it in the workflow, as it already displays the correct date.0 -
so it seems my users can see the attributes on an existing point in dd/mm/yyyy but the datepicker in the form still shows up as mm/dd/yyyy. Is there any way around this? There doesn't seem to be a way to set dateformat in the form in the workflow. Plus in the workflow it shows the date I want anyway, so I am not sure where this is coming from. 0 -
tested this with a newer version of html 5 viewer which allows date/time to be changed in site info. So it is set at Melbourne/Australia. However, the form still displays US format time.
Very frustrating!0 -
Hi Sylvia
Can you post the workflow here? I will have a look and compare it with some of our workflow forms to see if there is anything that I can suggest.
Alternatively you can email it to me and we will have a look. chris.roberts@sa.gov.au
Cheers
Chris0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
10 kommentarer