Date format on WF datepicker other than US
The datepicker control on a displayform always seems to have the US date format in the HTML viewer (MM/DD/YYYY). This confuses our users who expect the Dutch format: DD-MM-YYYY.
How can I change this?
0
-
I never figured out the answer, but perhaps you'll find some value in what I came up with. It doesn't kill the workflow, but it doesn't work either. There is a DateFormat property for that form item which can be accessed, but the values to which it may be set seem to be limited to the values in the Geocortex.Forms.Client.DatePickerFormat enumeration (short or long) and I can't figure out how to get the workflow designer to recognize an addition to that enumeration. I wonder if using the C# activity might be the solution. I've included what I came up with below anyway, perhaps you can make something out of it perhaps not. I'm not a .net devloper after all! In either case, please share what you come up with. Latitude should take the time to integrate this feature into the form! When they have time, of course.
form.Find(Of DatePickerFormItem)("DatePicker1").DateFormat =
CType(New Geocortex.Forms.Client.Converters.StringToDatePickerFormatConverter().Convert(Convert.ToInt32((form.Find(Of DatePickerFormItem)("DatePicker1").Date.Value.Date - New DateTime(1900, 1, 1)).TotalDays+2), Geocortex.Forms.Client.DatePickerFormat.Short.GetType(), "DD-MM-YYYY", new CultureInfo("en-US")),Geocortex.Forms.Client.DatePickerFormat)0 -
Hi Zack,
Thanks for your reply, but I'm afraid that's never going to work. The StringToDatePickerFormatConverter class is used just to convert a string (e.g. "Long") to the corresponding Enumeration value (DatePickerFormat.Long) and back.
If possible at all, I'd expect the solution to be in the viewer code, not on the server side.0 -
I also have this problem - the form shows the correct date format in my workflow, yet when it comes to the form in the html viewer it shows the us month-day-year when I want day-month-year.
In my graphic attributes it still shows the correct format d-m-y and silverlight shows the d-m-y format so I am guessing it has something to do with the viewer configuration.0 -
It appears to be one of the .json files in config - however I thought it was C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Manager\Html5Viewer\Viewer\Resources\Locales\mapping.en-US.json and changed the date format to what I wanted in there, however it still has the US date format in the map viewer.
Anyone from Latitude can answer this? why do we have US modules anyway?0 -
Hi Sylvia,
Don't edit the JSON files in \Manager\Html5Viewer\ rather edit the files in the inetpub directory. See below.
C:\inetpub\wwwroot\Html5Viewer\Resources\Locales
The US locales are the ones that ship with the viewer by default.
Thanks,
Mike Ketler0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
5 kommentarer