Questions tagged [uidatepickermodetime]

15 questions
10
votes
6 answers

iOS9: UIDatePicker with datePickerMode of UIDatePickerModeTime only shows Hours, and no Minutes

I'm using Xcode beta 7 with the iOS9 simulator. Using a UIDatePicker with a datePickerMode of UIDatePickerModeTime only shows Hours, and not minutes. See screenshot: On iOS 7 and 8, obviously it works as expected, and shows both Hours and Minutes.…
FranticRock
  • 3,233
  • 1
  • 31
  • 56
6
votes
2 answers

Display Only Hours In UIDatePicker

I have the following code that sets up a UIDatePicker to show only time. I have two of these UIDatePickers displaying and I want to use them to allow the user to select a time range e.g. between 7 am and 5 pm. UIDatePicker…
motionpotion
  • 2,656
  • 6
  • 42
  • 60
5
votes
1 answer

UIDatePicker customization

I have customized UIDatePicker to a level and I am adding it to UIAlertView. but I am getting a black color on the bottom and the top of date picker, how to remove it. I want the date picker to be neat and clean. The code I use to achieve…
Satheesh
  • 10,998
  • 6
  • 50
  • 93
4
votes
6 answers

How to disable only date selection in UIDatePicker not time selection

I am using UIDatePicker in my app and I want to disable only date selection in it and time selection should not be effected. Can anyone help me with this.
user2174560
  • 139
  • 1
  • 2
  • 7
2
votes
2 answers

blank UIDatePicker on iPad in mode UIDatePickerModeDateAndTime

I am struggling with the UIDatePicker on iPad. The setDate or .date assignment makes the DatePicker empty: UIDatePicker * dtVCpicker = [[UIDatePicker alloc] initWithFrame:CGRectZero]; dtVCpicker.datePickerMode =…
Felix
  • 751
  • 5
  • 10
1
vote
0 answers

Why UIDatePicker is not showing the time and days in .inline style in iOS 15

Hi I have a UIDatePicker with inline style and dateAndTime mode as InputView to a UITextField, and when datePicker appears its not showing the days and the time. Please refer the image1(when it appears) and image2(when tap on time). This is my…
Hilaj S L
  • 1,936
  • 2
  • 19
  • 31
1
vote
1 answer

UIDatePicker, time, and 1970

I've come across a small issue that I've been chewing on for a day or two now. Using the Apple example project called DateCell I lifted its UIDatePicker and set it to time. I used this particular code as it did the animated slide on/off the…
Reuben
  • 21
  • 1
  • 7
1
vote
1 answer

Combing NSString with the day of week and NSDate with the time into an NSDate object

I have the following two objects: An NSString object with a day of the week, ie Monday, Tuesday, Wednesday, etc. An NSDate object that was saved from a UIDatePicker with UIDatePickerModeTime. I need to create a third object, NSDate that is the…
Travis
  • 5,021
  • 2
  • 28
  • 37
1
vote
1 answer

UIDatePicker not rendering properly for certain modes in UIPopoverController

I have a UIDatePicker using UIDatePickerModeTime that I use in an iPhone app modally, works fine: Using this same basic code for iPad, but putting the view in a UIPopoverController gives some pretty inconsistent results. My desired mode…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
1
vote
1 answer

Hide dates in UIDatePicker in iOS

I want to hide the past as well as future dates from my UIDatePicker. Only want to show today's date. Is it possible? Right now all the dates are coming, but only today's date is selecting. Time is also there. So in short I want to select today's…
1
vote
0 answers

Change width of components in UIDatePickerModeTime

Ok so currently in the app I'm working on, I'm using (read: hacking) a UIDatePicker with the mode set to UIDatePickerModeCountDownTimer to allow users to enter the amount of time they waited. The issue with this is that you can't limit the maximum…
Matthew Davis
  • 173
  • 10
0
votes
2 answers

UIDatePicker Time gets reset on changing UIDatePicker's mode to UIDatePickerModeTime?

I am using UIDatePicker in my iPhone application.I have kept a button on clicking which the mode of datepicker switches between UIDatePickerModeTime and UIDatePickerModeDate. When I change the date of datepicker when the mode is…
Yogi
  • 3,578
  • 3
  • 35
  • 56
0
votes
1 answer

Is there anyway to hide the 24hrs format in UIDatePicker

I am doing the application with UIDatePicker for time format. It is working in 12hrs format, If i change the iPhone date/time to 24hrs format, I need to display only 12hrs format, not the 24hrs format. Is there anyway to disable the 24hrs format?
NewbieiOS
  • 81
  • 1
  • 1
  • 11
0
votes
1 answer

How to customise the UIDatePicker components in swift?

For custom date picker I am using the https://github.com/squimer/DatePickerDialog-iOS-Swift its working fine but I need to add two things on this 1.I need to re arrange the components order like date/month/year(i.e 23/05/2016) instead of the…
WeCan
  • 547
  • 2
  • 9
  • 23
0
votes
1 answer

Wrong time format ios

I have a time picker which displays time in 12 Hour format. Internally i am converting it to 24 Hour format. The problem is, if the time taken is 10:24, it displays 10:01. i.e 'now' will have 10:24 and 'self.currentTime' will have 10:01. What am i…
LeXeR
  • 214
  • 3
  • 20