Questions tagged [uidatepicker]

The UIDatePicker is a class in the UIKit framework of iOS which represents an graphical object that uses multiple rotating wheels to allow users to select dates and times.

The UIDatePicker class implements an object that uses multiple rotating wheels to allow users to select dates and times. On UIDatePicker, you can find the following methods:

Managing the Date and Calendar

  • calendar property
  • date property
  • locale property
  • setDate:animated:
  • timeZone property

Configuring the Date Picker Mode

  • datePickerMode property

Configuring Temporal Attributes

  • maximumDate property
  • minimumDate property
  • minuteInterval property
  • countDownDuration property
1611 questions
31
votes
10 answers

Disable blinking cursor in UITextField?

I've followed the instructions here and succesfully set up a UITextField that gets updated with a UIDatePicker. However the cursor in the UITextField is blinking, which seems quite a bit awkward to me. Is there any solution to get rid of that…
Tobias Frischholz
  • 331
  • 1
  • 3
  • 4
31
votes
5 answers

UIDatePicker pop up after UIButton is pressed

How can I make a UIDatePicker pop up (animated) after a UIButton is pressed, and then close down again once the date is selected? This is on the iPhone.
joshim5
  • 2,202
  • 4
  • 27
  • 39
30
votes
16 answers

Set text color and font for UIDatePicker in iOS8/Swift

I've been having trouble trying to set the UIDatePicker font and color. Everything else in my app was fairly straightforward to adjust except this. Does anybody know how to do this? I'm using Swift for iOS8.
Fenda
  • 1,335
  • 3
  • 12
  • 23
29
votes
7 answers

Setting the Datepicker in IOS to pick only the Month and Year

Is there any way possible to set a UIDatePicker in XCode-Interface Builder to just use the rollers of the "month" and "year" without the "day"? I've tried checking the file properties in the IB yet failed to find a solution for my problem...
Paul John Parreno
  • 395
  • 1
  • 5
  • 15
28
votes
7 answers

UIDatePicker bug? UIControlEventValueChanged after hitting minimum internal

I've run into a weird effect that sure looks like a bug in iOS7 -- but often in the past, when I have thought I found a bug in Apple's APIs, it has turned out to be my own misunderstanding. I have a UIDatePicker with datePickerMode =…
Joe Strout
  • 2,456
  • 1
  • 22
  • 36
28
votes
11 answers

Show Time in 12 and 24 hour format in UIDatepicker on the basis of app settings not on device Settings

My problem is there is a switch in my app which toggles for 12 hour and 24 hour time format.I am displaying my labels time according to that, but the UIDatePicker time is not getting changed.It's time is depending on device time settings format.Is…
Gypsa
  • 11,150
  • 6
  • 42
  • 82
27
votes
1 answer

UIDatePicker strange behaviour with Islamic calendar

Note: Bug reported to Apple Radar number: 29265429 (Link) I am using a UIDatePicker. When I give Gregorian calendar it works fine. The days starts from 1 to 31 However, when I give it Islamic islamicUmmAlQura it gives me a strange behaviour. The…
malhobayyeb
  • 2,595
  • 6
  • 50
  • 86
27
votes
21 answers

Jquery UI Datepicker not displaying

UPDATE I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. UPDATE END I having an issue with the JQuery UI datepicker. The…
scott
  • 305
  • 1
  • 5
  • 7
27
votes
8 answers

Objective-C: UIDatePicker UIControlEventValueChanged only fired on second selection

Working with UIDatePickers for the first time. To start, I'm just trying to update a text field with whatever value is selected from the datePicker (set in count down mode). It works, but only the second time that a user selects a time. My action,…
corbin
  • 2,767
  • 3
  • 15
  • 17
24
votes
5 answers

Display datepicker on tapping on textfield

How can I display a datetimepicker control on tap of a textbox? I have a user interface that has arrival and departure text fields, and when a user clicks on arrival textbox it should bring up a datetimepicker control up instead of a keyboard and…
appuser
  • 269
  • 1
  • 3
  • 10
23
votes
5 answers

Anyone find that UIDatePicker is broken under iOS 14?

Under iOS 14, the date/time pickers in my app are broken. Nothing changed in the project. They're defined in a storyboard and worked fine until I updated a few days ago. Now they're not spinners; they're large grey boxes with static text in…
Oscar
  • 1,603
  • 1
  • 24
  • 36
23
votes
8 answers

iOS Swift 3 - UIDatePicker

I have a UIDatePicker that shows the day, month and the year. But I don't know how to get those parameters. So What is the best way to get the day, month and year from UIDatePicker using Swift 3?
Anthony Shahine
  • 2,337
  • 3
  • 15
  • 24
23
votes
4 answers

NSDate with date component from one and time component from another NSDate

I have two UIDatePicker controls in my app, one configured with UIDatePickerModeDate and one with UIDatePickerModeTime. I want to configure a NSDate object with the date from UIDatePicker one and the time from the second one ... how? Thanks, Mark
Cornelius
  • 3,925
  • 3
  • 31
  • 54
22
votes
3 answers

Show datepicker on textfield tap

I'm very new to iOS so obviously I'm missing a few concepts when trying to follow this solution Display datepicker on tapping on textfield to my problem. I have the interface and implementation in a class called DatepickerAppDelegate, but I'm lost…
lolol
  • 3,969
  • 3
  • 32
  • 48
21
votes
5 answers

How to disable future dates,months and year in UIDatePicker?

How to hide the future dates in UIDatePicker for user choosing only past and current year of birthdays. I search lot of source but I can't get the desired result. Here is my code, dateofBirthDatePicker = [[UIDatePicker alloc]…
Ram
  • 629
  • 1
  • 5
  • 17