Questions tagged [timepicker]

A view for selecting the time of day, in either 24 hour or AM/PM mode.

The hour, each minute digit, and AM/PM (if applicable) can be conrolled by vertical spinners. The hour can be entered by keyboard input. Entering in two digit hours can be accomplished by hitting two digits within a timeout of about a second (e.g. '1' then '2' to select 12). The minutes can be entered by entering single digits. Under AM/PM mode, the user can hit 'a', 'A", 'p' or 'P' to pick. For a dialog using this view, see .

1534 questions
17
votes
4 answers

Is it possible to remove AM/PM button from TimePicker?

I want to show 24 hours clock instead 12 hours using TimePicker,and I dont need the AM/PM buton, Simply want to show 24 hours clock. Is this possible? I used setIs24HourView(true) but it is is not working. Suggest me How can I show 24 hours clock?
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
16
votes
6 answers

jQuery Datepicker and Timepicker for same input field to popup one after another

I have a Datepicker and a Timepicker in 2 separate input fields but I need to combine the 2 fields inputs into one for a database call. Wanted to know if I could only use 1 input field for both controls? first call the datepicker and the user would…
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383
15
votes
11 answers

Android TimePicker AM/PM button not invoking onTimeChanged

I'm having some issues implementing a TimePicker in my application that allows the user to change the time of a database record prior to inserting it. The problem is that when the AM/PM button is pressed, the onTimeChanged(View, int, int) method…
hooked82
  • 6,336
  • 4
  • 41
  • 46
14
votes
4 answers

Android - Disable (or Hide) Minute selection in TimePicker Dialog

In my project, I am using TimePicker dialog to allow users to select time. But I don't want them to select minutes. So, all I want is to disable (or hide) minute selection. So, How to do that?
Harshil
  • 914
  • 1
  • 12
  • 26
14
votes
2 answers

Get time using time picker android

How can I simply get time, set by the user on time picker widget in android ? Like this. timepicker.gettime();
Sharjeel
  • 145
  • 1
  • 2
  • 8
13
votes
5 answers

How can I add new button in date picker widget in android?

I want to add new button,which is clear button, to date picker widget and time picker widget in my android application. In default, these widgets have two button,set and cancel. How can I add one more button to these two button Is it possible? If…
SavasCinar
  • 667
  • 3
  • 8
  • 25
13
votes
3 answers

Datepicker and timepicker - set max and min values

I am trying to make something like a reminder app. I want to allow the user to select date and time that is not now (at least 5 minutes from now), and I also want to disable the user from selecting a date that is too far away - 30 days for example.…
Banana
  • 2,435
  • 7
  • 34
  • 60
12
votes
4 answers

Rails 4 - Convert datetime into separate date and time fields

How can you convert a mysql datetime field into two form fields (1) date only, (2) time only, and combine both fields back into datetime format on form submit? This would allow the use of the following gems, but store the dates in a single datetime…
Nicholas.V
  • 1,926
  • 2
  • 15
  • 30
11
votes
3 answers

How to set the TimePickerDialog to 24 hour?

I know how to set the TimePicker widget to 24 hour, how do you do the same for the TimePickerDialog??? Otherwise will I have to make a new dialog box altogether??
abhinav.mehra
  • 125
  • 1
  • 1
  • 7
11
votes
1 answer

Timepicker seems to crash My App on Samsung Devices With Android Version 6.0.1

I am facing a very annoying situation. I am trying display an alert dialog with DatePicker and TimePicker. It works on every device except some Samsung Devices (And according to the crash reports I received, all of them are Android Version…
Ankit Arora
  • 129
  • 7
11
votes
2 answers

Android: How to get the time from a TimePicker when it is typed in

I've got a DialogPreference which implements a simple TimePicker.OnTimeChangedListener (see below). Setting the time by clicking the +/- buttons works great. But I don't know how to save the state of the timepicker when the user typed in the time…
cody
  • 6,389
  • 15
  • 52
  • 77
11
votes
5 answers

How to set default time on Bootstrap timepicker

How can I set default time instead of current time for this datetimepicker http://tarruda.github.io/bootstrap-datetimepicker/ ?
iamspauljamez
  • 287
  • 1
  • 3
  • 14
10
votes
2 answers

TimePicker Dialog when pressing EditText

This question has been asked before, but the answers from back then, doesn't seem to work in Android Studio anymore, or else i'm missing something. I want a timePicker dialog to show up when you press the edit text area, to set the time in the…
9
votes
4 answers

How to change the material-ui-pickers time-picker timezone?

Time-picker is showing local timezone, how to change that to desired timezone?
Junie
  • 397
  • 2
  • 3
  • 12
9
votes
3 answers

Changing the title on a TimePicker?

I'm trying to look for a solution to change the title on a TimePicker dialog. Right now it says whatever the system time is (ex. "12:23 AM") but I want to change this to something a little more descriptive. Does anyone have any suggestions?
Sunandmoon
  • 297
  • 2
  • 4
  • 9