Skip to main content

change date format of html 5 viewer

Comments

10 comments

  • Chris Roberts
    Hi Sylvia

     

    This worked for us.

     

    Try: dd/MM/yyyy

     

    Cheers

     

    Chris
    0
  • Permanently deleted user
    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
  • Chris Roberts
    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
  • Permanently deleted user
    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
  • Permanently deleted user
    Have you tried changing the 'Data Time Zone' and 'Display Time Zone' under Site Info in Essentials Manager?
    0
  • Chris Roberts
    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/Default
    0
  • Permanently deleted user
    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
  • Permanently deleted user
    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
  • Permanently deleted user
    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
  • Chris Roberts
    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

     

    Chris
    0

Please sign in to leave a comment.