uidatepicker

iOS - Change Language for UIDatePicker by locale

浪尽此生 提交于 2019-12-01 09:46:00
问题 I'm creating the app in "Herbrew" language. (Language of IPhone can be anything, but my app runs only in Herbrew). In iOS for UIDatePicker, we have a property "locale" which will change the language that it is displaying. But in iOS5, the property is deprecated. How can I achieve it now? 回答1: Unfortunately, you cannot achieve this, not even with the calendar trick described by Martin Ulrich. I've struggled with the same problem myself and after a long research, I found out the bitter truth:

iPhone UIDatePicker in Landscape mode?

泪湿孤枕 提交于 2019-12-01 09:31:10
iPhone UI Componenet UIDatePicker does not support Landscape mode? it scratches 2/3 of the width in Landscape mode only. How to make it use up full width (480px)? Till Try to manually re/set the UIDatePickers' subviews bounds like this: - (void) viewDidLoad { [super viewDidLoad]; for (UIView * subview in datePicker.subviews) { subview.frame = datePicker.bounds; } } Everything is nicely described in this article: Using UIDatePicker in landscape mode 来源: https://stackoverflow.com/questions/2331752/iphone-uidatepicker-in-landscape-mode

Attempting to add an inline UIDatePicker to a UITableViewCell

本小妞迷上赌 提交于 2019-12-01 08:39:02
问题 I'm attempting to create an inline DatePicker inside a TableView cell, similar to this and this SO thread. I create the date picker using the method below, which is called when the view is loaded: - (void)createDatePicker{ _datePicker = [[UIDatePicker alloc]init]; _datePicker.datePickerMode = UIDatePickerModeTime; _datePicker.clipsToBounds = YES; _datePicker.backgroundColor = [UIColor colorWithRed:0.922 green:0.937 blue:0.949 alpha:1]; NSLog(@"date picker created"); } I then check to see if

UItableViewCell with UIDatePicker : month column gets covered

谁说胖子不能爱 提交于 2019-12-01 08:07:56
问题 UIDateTimePicker dropped on contentView of UITableViewCell in InterfaceBuilder Xcode 6.1 gets covered by white tiles. How to prevent it? 回答1: Update: This issue is resolved as of iOS9 beta 5. (2015.08.24) There seems to be a bug in UIDatePicker on iOS8. We just noticed this in Portrait mode on an iPad: @BS4248 - Is this similar to what you're seeing? For us, the Hour column is missing instead of the Month column. It doesn't happen on any device running iOS7 and it doesn't happen on iPhones. I

Save and Load Data - CoreData

被刻印的时光 ゝ 提交于 2019-12-01 07:38:16
I am very new to CoreData and in my iPhone app I want to know how to save some text, then load it back in. But the trick is, loading it back in when the date in the UIDatePicker is the same as when I saved it, like a calendar. Hope you can help in anyway. Its pretty important I learn how to do this fairly soon, so any help is massively appreciated, thanks. UPDATE: Thanks for the replies, especially the for the code sample. However I have some issues understand how this fits together, forgive me. I want to learn how this works, but to get it working in the mean time will really be helpful. I

How to disable only date selection in UIDatePicker not time selection

夙愿已清 提交于 2019-12-01 05:01:29
问题 I am using UIDatePicker in my app and I want to disable only date selection in it and time selection should not be effected. Can anyone help me with this. 回答1: Set the datePickerMode to UIDatePickerModeTime . 回答2: Please try this: datePicker.datePickerMode = UIDatePickerModeTime; Other options are: typedef enum { UIDatePickerModeTime, UIDatePickerModeDate, UIDatePickerModeDateAndTime, UIDatePickerModeCountDownTimer } UIDatePickerMode; 回答3: This will do the job datePicker.datePickerMode =

Add UIDatePicker to UIAlertView

谁说我不能喝 提交于 2019-12-01 04:36:05
I am trying to add a date picker to an alert view. I can add the animation to the screen based on a button click and I see a black box but no date picker. Here is what I have so far.... - (IBAction)showDatePicker { CGRect frame = CGRectMake(200, self.view.frame.size.height, self.view.frame.size.width, 0); //CGRectMake(225, 145, 260, 125); UIPickerView *datePicker = [[UIPickerView alloc] initWithFrame:frame]; UIAlertView *showDateAlert = [[UIAlertView alloc] initWithTitle:@"Enter the Code Date" message:@"Sample message" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Update", nil]

Datepicker dynamic min / max dates

怎甘沉沦 提交于 2019-12-01 00:43:15
I'm using the jQuery datepicker plugin on a site I am building. I need users to be able to pick two dates from within a specified range of dates. This is straightforward enough to do. The problem is that the allowable range of dates changes depending on another select box (with building names in). So what I need to happen is to look up the building in a mysql database, return the min and max date allowed and use the datepicker to allow users to choose a date range within the allowable range. On my main page, I am currently using: $('#dateStartMainChart').load(url); to load a php file which

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

纵然是瞬间 提交于 2019-12-01 00:42:26
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 via code with values from DB). How do I do that with the UIDatePicker in UIDatePickerModeCountDownTimer mode? Thanks in

jQuery UI Datepicker Add Days

自古美人都是妖i 提交于 2019-11-30 23:57:51
I'm attempting to create something of range system for booking rooms on a hotel website and I'm using jQuery UI Datepicker to allow the user to select their check in date. What I then want to do is create another field that's simple "Number of Nights" and have jQuery Datepicker take the check in date, add the number of nights, and set the resulting date as the value of a hidden input (in the correct date format). It would look something like this: <input type="text" name="arrivalDate" class="datepicker"> <input type="text" name="numOfNights"> <input type="hidden" name="departureDate" value=