mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828619 - Always update date time after changing 24hr mode. r=jchen
This commit is contained in:
parent
3a785a8c2d
commit
da40e79b6b
@ -160,14 +160,15 @@ public class PromptService implements OnClickListener, OnCancelListener, OnItemC
|
||||
} else if (type.equals("time")) {
|
||||
TimePicker input = new TimePicker(GeckoApp.mAppContext);
|
||||
input.setIs24HourView(DateFormat.is24HourFormat(GeckoApp.mAppContext));
|
||||
|
||||
GregorianCalendar calendar = new GregorianCalendar();
|
||||
if (!value.equals("")) {
|
||||
try {
|
||||
GregorianCalendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(new SimpleDateFormat("kk:mm").parse(value));
|
||||
input.setCurrentHour(calendar.get(GregorianCalendar.HOUR_OF_DAY));
|
||||
input.setCurrentMinute(calendar.get(GregorianCalendar.MINUTE));
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
input.setCurrentHour(calendar.get(GregorianCalendar.HOUR_OF_DAY));
|
||||
input.setCurrentMinute(calendar.get(GregorianCalendar.MINUTE));
|
||||
view = (View)input;
|
||||
} else if (type.equals("datetime-local") || type.equals("datetime")) {
|
||||
DateTimePicker input = new DateTimePicker(GeckoApp.mAppContext, "yyyy-MM-dd kk:mm", value,
|
||||
|
Loading…
Reference in New Issue
Block a user