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
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
  • 4,287
  • 3
  • 35
  • 54
21
votes
4 answers

How to set a specific default time for a date picker in Swift

Is there any way to set a date picker to display a specific time on load? I have four date picker instances initiated from four text fields for Start Time, Finish Time, Start Date and Finish Date using the squimer/datePickerDialog subclass from…
user3118171
  • 357
  • 1
  • 2
  • 8
21
votes
12 answers

problem when cloning jQuery UI datepicker

I have a div in which there is a datepicker. I use something like this to clone it: mydiv = $('#someDiv'); // works fine so far mydiv.find('input.datefield').datepicker(); // clone without the events and insert newDiv =…
h3.
  • 10,688
  • 15
  • 51
  • 54
19
votes
5 answers

How do I make a modal date picker that only covers half the screen?

I want to have the same effect as the birthday date setter in the iPhone contacts app. How do I have a modal date picker come up only halfway on the screen. I want the date picker to be over a UITableView (like in the iphone contacts app). I would…
19
votes
1 answer

Date Picker looks squashed as input of a Text Field

I have a UITextField that is using UIDatePicker as an input. I set the Date Picker's style to be .inline, but the result is not what I expected As you can see, the hour selector in the Date Picker looks squashed. This is my code: class…
19
votes
4 answers

Change UIDatePicker selected Date text Color for Dark mode (iOS 13)

Having trouble to find out a solution for changing the color of text for the selected Date in iOS 13 dark mode. I know how to change the color of the text of a UIPicker view using code self.timePicker.setValue(UIColor.black, forKeyPath:…
A K M Saleh Sultan
  • 2,403
  • 2
  • 22
  • 28
19
votes
2 answers

UIDatePicker 15 Minute Increments Swift

In swift, I'm wondering how I would use my UIDatePicker to select 15 minute increments. So instead of having hours with 60 minutes, I only want to be able to select 00 minutes, 15 minutes, 30 minutes, and 45 minutes. Here is my current…
YichenBman
  • 5,011
  • 8
  • 46
  • 65
19
votes
5 answers

Add a Done button within a pop-up datePickerView in Swift?

I want to add a Done button within a popped up datePickerView in Swift. Here is the code: @IBOutlet var datePicker: UITextField! @IBAction func dateTextInputPressed(sender: UITextField) { var datePickerView = UIDatePicker() …
He Yifei 何一非
  • 2,592
  • 4
  • 38
  • 69
18
votes
3 answers

UIDatePicker with 15m interval but always exact time as return value

I've got a UIDatePicker in Time mode with an interval of 15 minutes. Let's say it's 7:22PM. The value that the date picker shows per default is the current time rounded to the next higher/lower value, in this case, it's 7:15PM. If the user interacts…
TigreFurry
  • 483
  • 5
  • 14
18
votes
4 answers

UIDatePicker with UIToolbar

I'm trying to implement UIToolbar on UIDatepicker to dismiss it when touching "Done" button. But when I tap on the button, the datepicker is scrolling and the action button doesn't work. Here is my code : datepicker = [[UIDatePicker alloc]…
Thlbaut
  • 649
  • 7
  • 25
18
votes
7 answers

How to change UIDatePicker to a specific time (in code)

I need to change the UIDatePicker to a specific dynamically. My date picker is set to time mode only. i can set the time with timePicker.setDate(NSDate(), animated: false) but i cant figure out how to change it to a different time and not to…
ilan
  • 4,402
  • 6
  • 40
  • 76
18
votes
5 answers

getDate with Jquery Datepicker

i am trying to get date from my implementation of jquery date picker, add it to a string and display the resulting image in my div. Something however is just not working. Can anyone check out the code and have a look at it? The code is supposed to…
brass
  • 612
  • 2
  • 5
  • 15
17
votes
3 answers

Avoid UIDatePicker transparency in iOS7

i just upgraded my app to iOS7 and found that date picker is transparent. It looks like I can see everything which is behind the date picker. How can I avoid this? I tried to place date picker in another view. But still, its transparent. How can I…
Midhun Raj
  • 201
  • 1
  • 2
  • 5
16
votes
2 answers

UIDatePicker in UIPopover

I have searched the entire internet (maybe I am exaggerating a little) for a tutorial on how to put a DatePicker into a UIPopover and display that in an iPad application. I have tried creating a viewcontroller, placing the datepicker in the view…
Prajoth
  • 900
  • 3
  • 12
  • 26
16
votes
3 answers

How to combine date and time from two UIDatePickers?

I have two UIDatePickers in my app, one mode is for selecting date and other to time mode. I have fired a notification when the exact date and time is reached. I'm able to fire the reminder at correct time, but the problem is that the date is not…
Midas
  • 930
  • 2
  • 8
  • 20