зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1147770 - Modify datapicker to support literal 'T' and 'Z' when choosing datetime. r=wesj
--HG-- extra : rebase_source : 2e13e4489b5c6b7dae4374740f417608afdd2055
This commit is contained in:
Родитель
994c1415bd
Коммит
2f38e0cc6f
|
@ -216,7 +216,7 @@ public class PromptInput {
|
|||
input.setCurrentMinute(calendar.get(GregorianCalendar.MINUTE));
|
||||
mView = (View)input;
|
||||
} else if (mType.equals("datetime-local") || mType.equals("datetime")) {
|
||||
DateTimePicker input = new DateTimePicker(context, "yyyy-MM-dd HH:mm", mValue.replace("T"," "),
|
||||
DateTimePicker input = new DateTimePicker(context, "yyyy-MM-dd HH:mm", mValue.replace("T"," ").replace("Z", ""),
|
||||
DateTimePicker.PickersState.DATETIME);
|
||||
input.toggleCalendar(true);
|
||||
mView = (View)input;
|
||||
|
@ -259,7 +259,7 @@ public class PromptInput {
|
|||
} else if (mType.equals("datetime")) {
|
||||
calendar.set(GregorianCalendar.ZONE_OFFSET,0);
|
||||
calendar.setTimeInMillis(dp.getTimeInMillis());
|
||||
return formatDateString("yyyy-MM-dd HH:mm",calendar);
|
||||
return formatDateString("yyyy-MM-dd'T'HH:mm'Z'",calendar);
|
||||
} else if (mType.equals("month")) {
|
||||
return formatDateString("yyyy-MM",calendar);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче