diff --git a/app/src/main/java/com/example/citrusclient/views/CreateScheduleFragment.java b/app/src/main/java/com/example/citrusclient/views/CreateScheduleFragment.java index 91c1c43..3c51052 100644 --- a/app/src/main/java/com/example/citrusclient/views/CreateScheduleFragment.java +++ b/app/src/main/java/com/example/citrusclient/views/CreateScheduleFragment.java @@ -153,7 +153,7 @@ TimePickerDialog timePickerDialog = new TimePickerDialog(requireContext(), new TimePickerDialog.OnTimeSetListener() { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { - String time = hourOfDay + ":" + minute; + String time = String.format("%02d", (hourOfDay)) + ":" + String.format("%02d", (minute)); startTimeButton.setText(time); } }, hour, minute, true); @@ -173,7 +173,7 @@ TimePickerDialog timePickerDialog = new TimePickerDialog(requireContext(), new TimePickerDialog.OnTimeSetListener() { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { - String time = hourOfDay + ":" + minute; + String time = String.format("%02d", (hourOfDay)) + ":" + String.format("%02d", (minute)); endTimeButton.setText(time); } }, hour, minute, true);