Search Results

Search found 53 results on 3 pages for 'uidatepicker'.

Page 1/3 | 1 2 3  | Next Page >

  • UIDatePicker hours are disabled

    - by user112175
    I have a UIDatePicker object and I am setting it up as follows but for some reason my hours field is disabled on the current date but minutes are not. Not exactly sure what I am missing, any help would be appreciated. UIDatePicker *picker = [[UIDatePicker alloc] init]; picker.date = [NSDate dateWithTimeIntervalSinceNow:DATE_MIN_SECONDS_OFFSET]; picker.minimumDate = [NSDate dateWithTimeIntervalSinceNow:DATE_MIN_SECONDS_OFFSET]; This is what My datepicker looks like http://img.skitch.com/20100417-d75gq78pjwjb9d37ku9msmcduc.png

    Read the article

  • UIDatePicker questions regarding displaying

    - by Zap
    Does anyone know if it's possible to change the minute interval of a UIDatePicker after it's been added to a UIView? Is it possible to show and hide 2 different datePickers? I want change the minuteInterval of the UIDatePicker to 5 and 30 when I click a button. Any sample code would be appreciated.

    Read the article

  • iPhone - UIScrollView is scrolling before UIDatePicker that is placed inside it

    - by Oliver
    Hello, I have a UIDatePicker inside a UIScrollView. But the UIDatePicker does not respond to scroll touches. It's the scrollview that is scrolling. Reading some docs on the net, I've set "Delay Content Touches" to NO, an now I see the datepicker starting a slight scroll, but it's still the scrollview that take the final word. I have some place on the screen where the user can touch to scroll the view. So how may I separate the two kind of scrolls ans make the datepicker scroll in a normal way ? Thank you for your help

    Read the article

  • UIDatePicker date method is picking wrong date: iPhone Dev

    - by prd
    Hi, I am getting very strange behaviour on UIDatePicker. I have a view with date picker declared in .h file as IBOutlet UIDatePicker *datePicker; with property nonatomic and retain. datePicker is properly linked in IB file. In the code I am setting the minimum, maximum, initial date and action to call for UICOntrolEventValueChanged using following code If (!currentDate) { initialDate = [NSDate date]; } else { initialDate = currentdate; } [datePicker setMinimumDate:[NSDate date]]; [datePicker setMaximumDate:[[NSDate date] addTimeInterval:5 * 365.25 * 24 * 60 * 60]]; // to get upto 5 years [datePicker setDate:initialDate animated:YES]; [datePicker addTarget:self action:@selector(getDatePickerValue:) forControlEvents:UIControlEventValueChanged]; In getDatePickerValue, I get the new date using datePicker.date. When the view is closed (using a done button), I get the current value of the date using datePicker.date. Now if the view is called with no 'currentDate', the picker returns 'todays date'. This is what happens the 'first' time my pickerView is called. Each subsequent call to the view, with no 'current date' gives me a different and later date from today. So, first time I get today's date say 9 Jun 2010 second time datePicker.date returns 10 Jun 2010 third time 11 Jun 2010 and so on. Though its not always incremental, but mostly it is. I have put NSLogs, and verified the initial date is set correctly. The problem is only on the device (on OS 3.0), the issue is not replicated on simulator. I can't find what I have done wrong. I hope somebody else has come across similar problem and can help me resolve this.

    Read the article

  • UIDatePicker inside UIScrollView with pages

    - by Jason Martens
    I have a UIScrollView with 2 pages, and I can scroll horizontally between them. However, on one of my pages, I have a UIDatePicker, and the scroll view is intercepting the vertical touch events so I can no longer manipulate the date picker (except by clicking or tapping). Is there some way to tell the ScrollView to send the vertical touch events to the date picker, but send the horizontal touch events to the scroll view to switch pages?

    Read the article

  • Loading a UIDatePicker in Landscape on a UINavigationController

    - by Ryan
    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 rotate it. If I try load the date picker view in landscape to begin with, the view is all messed up. It looks like it would if it didn't support rotation and the frame only has about half of the picker visible and off center. I've tried making my own date picker that supports auto-rotate in case that was the problem, I've tried creating two different views and swapping them out, and I've tried changing the view frame size on the ViewWillAppear method. None of them seem to be working for me as of yet. Anyone have any suggestions on how to get the date picker to show up in landscape correctly on a navigation controller? I probably am overlooking something simple and the answer is right in front of me, but I'm not finding it.

    Read the article

  • set date error on uidatepicker

    - by Matt Facer
    Hi guys, I've been stumped by the code below. I pass a string date to a UIDatePicker which seems to work on most devices, yet on some, it crashes the app. here's the code NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"HH:mm"]; NSDate *date = [dateFormat dateFromString:dateStr]; [timePicker setDate:date]; [dateFormat release]; I have a function which passes the "dateStr" variable, as follows, dateStr = @"0:0"; I cannot see what's wrong - as it works for me! (iphone 3.1.3) but it doesnt work for my tester (ipod touch 3.1.3) Can anyone see anything wrong with the code? Thanks v much. any ideas?

    Read the article

  • Setting an delegate for the UIDatePicker animation?

    - by james.ingham
    If I had a date picker within an action sheet and called the following line: [datePicker setDate:newDate animated:YES]; And then my app hides the action sheet the date picker is within, is there anyway to set up a animation delegate so that the user see's the animation of the date picker first and then hides the action sheet? I have done this with UIView's by calling: [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(METHOD)]; However I can not see anything like this for the date picker. Thanks in advanced - James

    Read the article

  • jqgrid uidatepicker

    - by lucianoffranca
    I'm having a problem with the DatePicker implementção with jqGrid. I got it using editoptions:{dataInit:functiondate} for the DatePicker is instantiated. User clicks on the field and called datepicker and perfectly. When the datepicker is appearing and click directly on the close button of the form. The form closes and the datepicker was open. How to solve this problem? Thanks.

    Read the article

  • UIDatePicker in UIDatePickerModeCountDownTimer mode: how to get/set the hours and minutes via code?

    - by R31n4ld0
    Hello, guys. How to get/set the hours and minutes via code from a UIDatePicker in UIDatePickerModeCountDownTimer mode? The situation: I have an interface in that a user selects just hours and minutes. Then, he saves the information (so, I have to get the hours and minutes from UIDatePicker via code to save in a DB). When the user is editing the information saved previously, I want to start the interface with the saved hours/minutes (so, I have to set the UIDatePicker hours and minutes retrieved from DB via code). How do I do that with the UIDatePiker in UIDatePickerModeCountDownTimer mode? Thanks in advance.

    Read the article

  • Why would a UIDatePicker with no functionality, added to my app via IB, cause my app to crash?

    - by BeachRunnerJoe
    I just added a UIDatePicker to my iPad app using IB, linked it to its outlet in the code, saved it in IB, added the UIPickerViewDelegate to my UIViewController in the code, as well as added the UIDatePicker outlet in code. When I build and run, the app launches, but will crash intermittently when I attempt to open the popover view that contains the datepicker. I say intermittently because the popover view will occasionally open successfully, but never more than once (it always crashes the second time you open the popover, if it doesn't crash the first time). Also, in the console, I get the following messsage objc[594]: FREED(id): message lastClickRow sent to freed object=0x6015a70 Why is this happening and how can I fix it? What does that console message indicate? It may be worth mentioning that the popover view also contains a table view along with the datepicker control. Thanks so much in advance for your help!

    Read the article

  • Why Is Bottom Half of Custom UIActionSheet with UIDatePicker Disabled?

    - by Gorgando
    Everything seems to be working great with my UIActionSheet that contains a UIDatePicker except that the bottom half of the DatePicker is disabled. Visually there is a shadow that makes the bottom half of the picker darker than the top half. Everything in the bottom half is disabled and I can't for the life of me figure out how to enable it. I also noticed in my other "normal" UIActionSheets that just contain buttons, the bottom half of the cancel buttons are disabled. This is the code for my custom UIActionSheet: self.datePickerView = [[UIDatePicker alloc] init]; self.datePickerView.datePickerMode = UIDatePickerModeDate; self.actionSheet = [[UIActionSheet alloc] initWithTitle:@"Choose a Follow-up Date" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"Done", nil]; [self.actionSheet showInView:self.view]; [self.actionSheet addSubview:self.datePickerView]; [self.actionSheet sendSubviewToBack:self.datePickerView]; [self.actionSheet setBounds:CGRectMake(0,0,320, 500)]; CGRect pickerRect = self.datePickerView.bounds; pickerRect.origin.y = -95; self.datePickerView.bounds = pickerRect; I've tried several things including sendSubviewToBack, BringSubviewToFront, etc but I have not had any luck. I appreciate your help!

    Read the article

  • UIDatePicker - Problem Localizing

    - by Smorpheus
    Hello, 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 IB appears to do nothing. Attempting to change my DatePicker programatically with Locale and NSCalender also do nothing via the following code: NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"]; datePicker.locale = locale; datePicker.calender = [locale objectForKey:NSLocaleCalender]; This results in an english picker. Here's the really weird thing though. The word for "Today" is translated. As seen in the attached screenshot. (OK I'm not allowed to post images. But imagine a Date & Time picker with "May" in English and "Today" written "Ajourd'hui". Based on what I've read, adding the UIDatePicker programatically doesn't seem to help much.

    Read the article

  • Configure UIDatePicker with current locations time

    - by Telkitty
    I am using UIDatePicker in my current app, here is how I set a UILabel with the date time string obtained from the UIDatePicker. -(IBAction)AddTimeEnd:(id)sender { NSDate * date = [m_DateTimePicker date]; m_DateTimeLabel.text = [date description]; } Somehow the time I have entered (EST) kept on getting converted to US time in the UILabel. Does anyone know how to fix it? I would like the time entered in UIDatePicker to be consistent with the text in the label (probably the simplest way is set the locale for the UIDatePicker to be the local timezone)?

    Read the article

  • UIDatePicker locale does nothing?

    - by morticae
    I'm creating a UIDatePicker programmatically, and setting its locale with the following code: datePicker.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"] autorelease]; The datepicker still appears in English (or whatever language I've set the phone to). Anyone have any idea why this does nothing, or how to fix it?

    Read the article

  • UIDatePicker Not storing time in core data

    - by Derek
    Hi, I am using a UIDatepicker with only "Time", I save the time in a NSDate object type, however when I try to store the Object in core data I get an error saying its not a NSDate type... *tt = [pickerTime date]; [myObject setValue:tt forKey:@"time"]; Thanks,

    Read the article

  • Bring to front DatePicker on an UITextField

    - by crazyfr
    Hi, When an UITextField is firstResponder, I would like to bring to front an UIDatePicker (bottom part of the screen) without the "going down keyboard" (no call to UITextField resignFirstResponder). The aim is to process like UIKeyboard of UITextField which pop-up on nearly everything when it becomeFirstResponder. modalViewController seems to be fullscreen only. - showDatePicker:(id)sender { if([taskName isFirstResponder]) [taskName resignFirstResponder]; [self.view.window addSubview: self.pickerView]; // size up the picker view and compute the start/end frame origin (...) [UIView commitAnimations]; } This example is an animation of keyboard going down, and DatePicker going up, behind and not in front. Do you know a solution ? A piece of code would be welcome. Thanks in advance.

    Read the article

1 2 3  | Next Page >