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
1661 questions
16
votes
9 answers

Convert date in MM/dd/yyyy format in xcode?

I have a UIDatePicker and I m getting the selected date from it in yyyy-MM-dd format.Now I want to convert it to MM/dd/yyyy format ..How can i do it ? NSDateFormatter *df=[[[NSDateFormatter alloc]init] autorelease]; df.dateFormat =…
Honey
  • 2,840
  • 11
  • 37
  • 71
15
votes
1 answer

UIDatePicker in UIActionSheet on iPad

In the iPhone version of my app, I have a UIDatePicker in a UIActionSheet. It appears correctly. I am now setting up the iPad version of the app, and the same UIActionSheet when viewed on the iPad appears as a blank blank box. Here is the code I am…
Chris
  • 5,485
  • 15
  • 68
  • 130
15
votes
2 answers

How do I rewrite the UIDatePicker component?

I've noticed that the UIDatePicker doesn't work with NSHebrewCalendar in iOS 5.0 or 5.1. I've decided to try and write my own. I'm confused as to how to populate the data and how to maintain the labels for the dates in a sane and memory efficient…
Moshe
  • 57,511
  • 78
  • 272
  • 425
14
votes
2 answers

Limiting UIDatePicker dates from a particular time. Such as Input DOB to a restricted age limit

In my code, I have a UITextField that when the user taps on opens a UIDatePicker to enable the user to easily and efficiently scroll through to their Date Of Birth. Obviously, we wouldn't want the UIDatePicker to scroll up to 2015 and over as it…
Martin Q
  • 403
  • 1
  • 6
  • 13
14
votes
5 answers

UIDatePicker - Problem Localizing

I've created a UIDatePicker in my app and I also have support for several languages. My UIDatePicker is created in Interface Builder, and I have created a seperate localization XIB so I can customize my UIDatePicker. Setting the "Locale" option in…
Smorpheus
  • 572
  • 1
  • 4
  • 12
14
votes
8 answers

Why doesn't jQuery UI datepicker work in jQuery dialog modal?

I want to use jQuery UI datepicker in one of my text inputs. This one is in a dialog modal. In fact, I can call datepicker in the normal document text inputs and i got my calender normally but I can't do that in dialog modal text inputs (after…
aa th
  • 161
  • 1
  • 1
  • 7
14
votes
2 answers

Elegantly replace iPhone keyboard with UIPickerView

I have a table view that has embedded UITextFields for entering some data. It also has two other fields that popup a UIPickerView and a UIDatePicker - as demonstrated in the DateCell example from Apple. Mostly it works but I can't figure out how to…
Brad Robinson
  • 44,114
  • 19
  • 59
  • 88
13
votes
5 answers

Unable to Tap Days in iOS 14 inline DatePicker

I'm trying to create an expandable/collapsible date picker (similar to Apple's date picker in the Date & Time section of the Settings app). I have a tableview that can have a button as one of its table cells. That button shows the currently picked…
Alzeon
  • 283
  • 2
  • 9
13
votes
1 answer

iOS Show UIDatePicker between UITableViewCells

In iOS 7, developers are encouraged to show date pickers between table cells when needed for input, and then hide them when done. How can I achieve this effect?
danielmhanover
  • 3,094
  • 4
  • 35
  • 51
13
votes
10 answers

UIDatePicker returns wrong date (-1 day to the real date)

I have a UIDatePicker mm/dd/yy. It works fine, but there is one problem: I set minimum and maximum date to it, and when user tries to choose the forbidden day, month or year, the [datePicker date] property begins working wrong. It returns you the…
SmartTree
  • 1,381
  • 3
  • 21
  • 40
13
votes
8 answers

Custom iOS UIDatepicker using UIAppearance

UNIQLO's new alarm app has a custom UIDatePicker: And I want to create my own custom UIDatePicker. I tried to change the appearance of the DatePicker, but looking for UI_APPEARANCE_SELECTOR in the UIDatePicker returns nothing. Meaning that its not…
daihovey
  • 3,485
  • 13
  • 66
  • 110
12
votes
2 answers

Sort NSFetchRequest by date and then by alphabetical order

I want to order a NSFetchRequest first by date and then, if it matches the same day order by name. I use a UIDatePicker to get the date and the save it using Core Data [self.managedObject setValue:self.datePicker.date forKey:self.keypath]; and sort…
android iPhone
  • 860
  • 2
  • 11
  • 22
12
votes
2 answers

How can I set countDownTimer mode in DatePicker on SwiftUI?

With UIKit, the UIDatePicker allow set mode to UIDatePicker.Mode.countDownTimer and we can have set duration. With SwiftUI, I don't see any native way to solve this. The only way would be doing interface with UIKit? [UPDATE] Only solution…
12
votes
2 answers

UIDatePicker produces feedback after scrolling is finished. Explanation required

So I have UIDatePicker initialized programmatically. It has some subviews with NSLayoutConstraints. Also it has a custom text color setValue(textColor, forKey:"textColor"). It is positioned in superview with the help of NSLayoutConstraints. Every…
iWheelBuy
  • 5,470
  • 2
  • 37
  • 71
12
votes
7 answers

UIDatePicker not displaying wheel for day of the month (dd) on iPad for iOS 8.1

I have a UIDatePicker in a TableView with Static Cells. The DatePicker works perfectly in iPhone version of App, but the iPad seems to compress the DatePicker so that the center column that holds the day of the month (dd) does not display. Notice…
PhillipOReilly
  • 609
  • 12
  • 28