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

iPhone Date Picker rolls over to 2010 on December 27th?

So I implemented a UIDatepicker in one of my applications for scheduling and autodialing teleconferences... everything is pretty much ready to go except, while testing I noticed that when the date rolls over from December 26th to December 27th, the…
Taylor
  • 240
  • 1
  • 10
12
votes
1 answer

Add eventhandler to jQuery UI datepicker after its creation

I have the following scenario: In my masterpage I have: $(".datepicker").datepicker({ changeYear: true, changeMonth: true, dateFormat: "dd/mm/yy", duration: 'fast' }); With this, every input field that I assign the class…
Thomas Stock
  • 10,927
  • 14
  • 62
  • 79
11
votes
1 answer

Close UIDatePicker after selection when style is .compact

Storyboard application using Swift. How can I close the calendar (presented for date selection when the UIDatePicker style is .compact) after a user selects a date? Currently, the user is required to tap outside the calendar for it to close. I want…
Dwigt
  • 729
  • 6
  • 16
11
votes
4 answers

DatePicker using Time-Interval in SwiftUI

I want to use a DatePicker in SwiftUI, it is working fine and as expected. I want to add an Time-interval, like explained: UIDatePicker 15 Minute Increments Swift DatePicker("Please enter a time", selection: $wakeUp, displayedComponents:…
Jonas Deichelmann
  • 3,513
  • 1
  • 30
  • 45
11
votes
1 answer

UIDatePicker show only month and day

I'd like to have a UIDatePicker where the user can pick a month and a day but not the year. I'm aware that leap years have an extra day, so for simplicity, let's throw that day away. Is there any way to remove the year column or have 2 reels with…
Maximillian
  • 119
  • 1
  • 1
  • 3
11
votes
4 answers

how to implement date picker on button click in ios?

I am building an iOS app.I am using storyboards to build the screens and i have made a form which contain some fields like Name,Date,min and max. I am facing an problem that is not able to implement date picker on button click and when user select…
Daljeet
  • 1,573
  • 2
  • 20
  • 40
11
votes
0 answers

iOS: UIDatePicker "remove" dates outside min and max dates

I have coded a simple UIDatePicker with minimum and max dates. I want the datepicker to NOT show the unavailable dates, not only disable them. Actual: you are able to scroll through all the unavailable dates, but when you rest on an unavailable…
B-Man
  • 2,209
  • 3
  • 22
  • 35
11
votes
3 answers

Trigger jQueryUI datePicker on button click, send result to disabled input field

I've been searching for a way to do this, but could not find anything I want to have a: Disabled input text field, called #XX. This input will store the selected value from datepicker (as this input is disabled I won't be able to use this to…
Enrique
  • 1,015
  • 4
  • 27
  • 54
11
votes
3 answers

Comparing an NSDate to [NSDate date]

I am trying to force a user to select a date in the future with a date picker. I obviously used the compare: method, however, when I do the following code, even if it's the same date as [NSDate date], it tells the executes the if statement. Here is…
skylerl
  • 4,030
  • 12
  • 41
  • 60
11
votes
1 answer

UIPickerView disable row selection

I want to disable the selection of certain rows in my UIPickerView. Like in the Coundown timer, where you try to choose 0, it doesn't let you and slips back up to 1. Or how you can limit the date in the Date Picker... How do a disable rows in a…
Zac Altman
  • 1,215
  • 4
  • 25
  • 37
11
votes
2 answers

UIDatePicker slows things down

I have spent a good time and concluded that UIDatePicker slows presentModalViewController: down by a few seconds. I have a view controller with two buttons and a date picker. In another class, I present this view controller with this…
MCKapur
  • 9,127
  • 9
  • 58
  • 101
10
votes
2 answers

UIDatePicker rendering is getting right aligned in Xcode 13 (iOS 15)

I compiled my app with Xcode 13 and iOS 15, and I noticed the UIDatePicker is getting right aligned. You can see that my storyboard is properly setup with constraints: This UI element was working fine, even if I download the App Store version of…
KBog
  • 3,800
  • 1
  • 25
  • 31
10
votes
3 answers

jQuery ui datepicker, get Day of week from onSelect

Is it possible to get the day of the week from the onSelect event of the datepicker. I know I can get the day of the month, but I want the day of the week. Even just the day index will be fine e.g. 0-6. I know you can get it in the beforeShowDay…
SteveCl
  • 4,529
  • 6
  • 29
  • 38
10
votes
5 answers

Detect if UIDatePicker is rolling?

I'm using a UIDatePicker in a modal view, to select a date. I found that if the view is closed while the date picker is still rolling, I got a EXC_BAD_ACCESS. How can I detect of the date picker is rolling when the user tab a button? I had two…
oscarm
  • 2,630
  • 6
  • 41
  • 74
10
votes
1 answer

Refresh internal state of iOS UIDatePicker after midnight

I'm writing an iPhone app (Swift 4.0, iOS 10.3.3, Xcode 9.2) with a single main UIViewController that contains a UIDatePicker whose mode is the default UIDatePickerMode.dateAndTime. The user is intended to keep the app running in the background…
chbrown
  • 11,865
  • 2
  • 52
  • 60