We are using the XamDateTimeEditor to enter in the start and end dates and times for a reporting module in our application. For one of our report types, we want to only allow the user to enter the date and the hour range (no minutes). This works fine for every region setting in Windows except for Chinese and Japanese, as far as I have tested to this point.
For those two languages, the date shows up as expected, but no hour value is displayed. There are two spaces for the hour value, and the user can type something in, but the value disappears as soon as the control loses focus. Everything appears to be correct as far as the DateTime format string is concerned.
The code we use to generate the mask is:
var dateMask = Infragistics.Windows.Editors.XamMaskedEditor.CalcDefaultDateMask(CultureInfo.CurrentCulture); var timeMask = Infragistics.Windows.Editors.XamMaskedEditor.CalcDefaultTimeMask(CultureInfo.CurrentCulture); string output = dateMask + " " + timeMask.Replace(":mm", ""); return output;
For English, this outputs "mm/dd/yyyy hh tt", and the UI looks like:
For Chinese and Japanese, the output is "yyyy年mm月dd日 hh", and the UI looks like:
Other regions, obviously, have other formats, but, like I said, this only fails for Chinese and Japanese. We are not seeing this error for other regions that use non-Arabic characters, nor for other regions that use a 24 hour clock.
I can't find anything on our end that would cause this failure, so my next question is if this is a bug on your end. If so, is there a workaround that we can implement? Any other thoughts? Thanks in advance.
Hello Gordon,
Thank you for the code you have sent.
It seems that for some reason the UI images did not pass through. Would you, please try re-uploading them?
Additionally, can you provide information what version you are currently using.
Having this information will help me to further investigate this for you.
Thank you for the reply. The version we are on is 16.2.20162.2045 .
I'll try to upload the images again, but they really just show what I was describing.
In English (US), the text display looks like: "08/17/2017 12 AM".
In Chinese the display looks like "2017$08$17$" (with the relevant Chinese characters in place of the $). Note the missing hour value.
We see this in both Win7 and Win10.
Thanks.
Thank you for the additional information, you have sent.
After investigating this issue, with the XamDateTimeEditor not showing the hour value when Chinese or Japanese regional settings are used, I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 241276. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
Please let me know if you need more information.
So I take it this is an issue with the control itself? We will try to find a way to deal with it on this end, but if you have a workaround in the meantime, please let me know.
Thanks!
I contacted our development team and due to the complexity of the issue in regards to the internal logic for regional settings a workaround cannot be introduced. Our engineering staff continues working on the issue and we will update you as soon as there is any additional information.
Any updates on this issue?
The issue with date and hour using Chinese regional settings (ID 241276) has been fixed internally and will be included in the next service release. This forum post will also be updated when the service release is available. You can see the service release schedule here:
http://es.infragistics.com/support/service-releases
Let me know if you have any questions.
We just updated the libraries, and the fix works. Thanks!
Hello,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads page.
Thank you for using Infragistics Components.
Awesomeness. Thank you very much.