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
9
votes
3 answers

Detect iPhone 24-Hour time setting

I'm using a UIDatePicker to select a time. I am also customising the background of the picker, however I need 2 different images depending on whether the user is using 12 hour mode (which displays AM/PM column) or 24 hour mode. How can I detect the…
Darren
  • 10,182
  • 20
  • 95
  • 162
9
votes
6 answers

How to set UIDatePicker's date's seconds value to 00?

How to always get seconds value "00" for UIDatePicker's date? Now I am getting value like this format 5:30:45, I need to get this format of time 5:30:00. How to achieve this?
iSara
  • 919
  • 3
  • 10
  • 24
9
votes
5 answers

Can I localize a UIDatePicker?

I'm trying to localize a UIDatePicker. Apple's docs say that it should autodetect the current locale, yet the language stays the same, no matter what language I select. What do I have to do?
spoonforknife
9
votes
6 answers

Loading a UIDatePicker in Landscape on a UINavigationController

I have a custom UINavigationController that supports auto-rotate. I also have a UIDatePicker on one of my views that I throw onto the stack of the Navigation controller. The auto-rotate works if I start the date picker view in portrait and then…
Ryan
8
votes
2 answers

How to add Date picker in Action Sheet?

- (IBAction) showCatPicker { if (self.catList !=nil) { self.catList=nil; [catList release]; } self.catList = [[NSMutableArray alloc] init]; self.actionSheet = [[UIActionSheet alloc] initWithTitle:nil…
Gaurav Govilkar
  • 154
  • 1
  • 1
  • 10
8
votes
1 answer

Swift iOS14 DatePicker text alignment

I want my date picker to show the text right aligned as it is contained in an right aligned tableView. I'm using the iOS 14 default style were selecting the date picker ends up in a popover to select the date, so by default the label is left aligned…
Philipp Rosengart
  • 713
  • 1
  • 8
  • 20
8
votes
2 answers

UIDatePicker Not working In Mac Catalyst (Xcode 11 Beta 5)

We are converting our iOS app to Mac Catalyst compatible using Swift in Xcode 11 beta 5. We have facing issue that default DatePicker not shown in window. I am trying this solution for mac and it will add date picker in view but I want another…
Hardik Thakkar
  • 15,269
  • 2
  • 94
  • 81
8
votes
6 answers

Disable UITextField editing but still accept touch - Swift 3

I'm creating a UITextField that has a UIDatePicker as input. I don't want the textfield to be edited (copy, paste, cut and select text), but I only want to show UIDatePicker when users touch the UITextField and the chosen date will be displayed on…
user-unknown
  • 453
  • 2
  • 7
  • 22
8
votes
1 answer

UIDatePicker issue in iOS9

Date is hiding in UIDatePicker in iOS9. i am using xib. This issue is only in xoode7(iOS9) Can any one help me to solve my issue??
Akash Raghani
  • 557
  • 1
  • 9
  • 21
8
votes
6 answers

How in iOS to localize text of the month in UIDatePicker, and if it is possible at all?

I make search and up to now I see that UIDatePicker is working with localization of the device. I have app which has internal lozalization. I need to change month's text dependantly of my internal localization. As I read it appears that this is not…
new2ios
  • 1,350
  • 2
  • 25
  • 56
8
votes
3 answers

Replace iOS7 Keyboard by a Date Picker in TableViewController

I would like my textfield "DateText" to open a DatePicker (Year - Month - Day) with this type of value: YYYY-MM-DD Is there an easy way to change the keyboard?
KevLaBoomQc
  • 147
  • 1
  • 9
8
votes
3 answers

Jquery Datepicker trigger after changing month (after month renders)

I want to highlight some days in the current month. I can do this on the first month, but not on a new month after "next month" or "prev month" is clicked. I tried using onChangeMonthYear event but this executes before the new (or prev) month…
user278860
8
votes
3 answers

Timezone issue with UIDatePicker Date: 1 Hour Wrong

I'm having an issue with the Monotouch UIDatePicker being 1 hour behind. I think this is to do with Time Zones or something similar. I've tried explicitly setting the TimeZone and Locale of my UIDatePicker but this doesn't seem to be…
binncheol
  • 1,393
  • 4
  • 22
  • 38
8
votes
2 answers

DatePicker include Year

I have dataPicker in my app implemented. But it only shows month,day,hour. How could I able to add year in the date picker. Any idea?
user1724168
8
votes
1 answer

How to keep jquery ui datepicker in place (stick to the input control) while scrolling?

After reading a lot of on the subject I'm still in the dark about how to approach resolving the problem. To clarify problem, I want calendar to scroll altogether with input control associated and not to stay fixed at whatever screen position. Here…
krul
  • 2,211
  • 4
  • 30
  • 49