-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display dates from date or datetime widgets and times from time or datetime widgets using the phone locale #897
Comments
Let us to take it with @nikialexopoulou because we already started in this direction. |
That sounds good @nmpatsal @nikialexopoulou. It does look like a simple issue but it's somewhat more complicated because it touches JavaRosa! I'm looking forward to seeing how you propose to address it. |
I would recommend addressing the date display on the widgets themselves first as one pull request. I think that will be relatively straight forward and we do want to include that in the April release. The |
There's one more requirement for this that I just thought of. The date display should respect the Do you think you can get the first part of this done by Monday 4/24? If not, let us know so someone else can complete it before the code freeze next Wednesday! |
@lognaturel we'll try to make it. If we see that we can't do it, we'll inform you by tomorrow. |
@lognaturel we can't complete the issue, so if anyone else would like to take it, please do. I'm sorry we're late but we were trying till today. |
Thanks for letting us know, @nikialexopoulou. |
@lognaturel I have fixed this locally but I would like to merge #935 first. |
Currently, Date, Time and DateTime widgets are displayed using the
getDisplayText
method on theIAnswerData
that they represent. That method does not respect the device's locale.For example, a date widget with appearance
![screen shot 2017-04-14 at 12 17 24 pm](https://cloud.githubusercontent.com/assets/967540/25053653/5536427a-210d-11e7-9a46-a9d35bf5677a.png)
no-calendar
and the phone locale set to US English:The date should use the order 4/17/17. I think it would be even better using the
LONG
format --April 17, 2017
in US English or17 avril 2017
in FR French. For times I like theMEDIUM
format --7:03:47 AM
in US English or 07:03:07 in FR French. See docs here.Similarly, in the jump menu (
![screen shot 2017-04-14 at 12 17 37 pm](https://cloud.githubusercontent.com/assets/967540/25053689/82377e10-210d-11e7-9ba2-410355b5af01.png)
FormHierarchyActivity
):This form is a good one to use for seeing the problem.
This should be easy enough to address for the widgets but it's somewhat annoying for the jump menu. One simple approach would be to add special cases in
FormEntryPrompt
'sgetAnswerText
. It would be good to describe some different approaches here so we can discuss.The text was updated successfully, but these errors were encountered: