Sunny, I am terribly sorry and I don't mean to beat a dead horse here, but I have almost gotten the DateTime picker to work. Using your sample "code_mix.zip" file, I was able to adapt it from the Alert window to displaying my datepicker. I have been able to display it and position it where I want it with the following code:
- Code: Select all
- (void)showMyDatePicker
{
UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:[_webView bounds]];
datePicker.autoresizingMask = UIViewAutoresizingFlexibleWidth;
datePicker.frame = CGRectMake(0, 156, 320, 216);
[_webView addSubview:datePicker];
[datePicker release];
}

- datepicker.png (80.33 KiB) Viewed 1787 times
But that is as far as I have gotten. And I know there is probably some lines above that are wrong or not necessary, but it works, so I didn't want to mess with it. However, I can not for the life of me figure out how to then get the date sent back to javascript. I have taken your original delegate code block from your "code_mix.zip" alert example:
- Code: Select all
#pragma mark -
#pragma mark UIAlertViewDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
[self._webView performSelectorOnMainThread:@selector(stringByEvaluatingJavaScriptFromString:) withObject:[NSString stringWithFormat:@"clickedButton('%d')", buttonIndex] waitUntilDone:NO];
}
and tried to change it for the datepicker, but no matter what I tried, I could not figure out what to do next, so here is the delegate block without any code in it.
- Code: Select all
#pragma mark -
#pragma mark UIPickerViewDelegate
- (void)pickerView:(UIPickerView *)pickerView
{
// DONT KNOW WHAT TO PUT HERE
}
I don't know what code to put in the block nor how I would trigger that code in the first place after selecting the date from the scroll wheels. If you could please give me a starting point to launch from I would greatly appreciate it. My Company was finally approved by Apple earlier today and I have paid my $99 to them and finally got a chance to provision my phone for testing outside of the simulator, but this datepicker is the last thing holding me back from my App being ready for submission.
Once I get this figured out, I will be purchasing my $99 Nimblekit license and submitting to the App store (after 1.5 is out of beta actually), but it all depends on if I can figure out the datepicker issue.Thanks again for all of the help you have given the entire community. You have opened the door to those of us having minor c/obj-c knowledge as well as those with no knowledge at all to get our hands into iPhone development.