關於這個問題,您可以顯示iPhone的日期選擇器
讓我們在代碼 先在此功能,您需要註釋的特殊情況下爲iPhone做書面它一般情況下看
(void)show:(CDVInvokedUrlCommand*)command {
_command = command;
NSMutableDictionary *options = [command argumentAtIndex:0];
//if (isIPhone) {
[self showForPhone: options];
//} else {
// [self showForPad: options];
//}
}
,不要忘記刪除特殊處理也隱藏
(void)hide {
//if (isIPhone) {
CGRect frame = CGRectOffset(self.datePickerComponentsContainer.frame,
0,
self.datePickerComponentsContainer.frame.size.height);
[UIView animateWithDuration:ANIMATION_DURATION
delay:0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.datePickerComponentsContainer.frame = frame;
self.datePickerContainer.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
} completion:^(BOOL finished) {
[self.datePickerContainer removeFromSuperview];
}];
// } else {
// [self.datePickerPopover dismissPopoverAnimated:YES];
// }
}
你有沒有找到解決這個問題的方法?我遇到了同樣的問題,但使用了更新版本的datepicker插件。我看到,它支持一個X和Y配置在文檔中,但是這僅是相對於拾取器絕對定位到應用程序的根視圖,拾取器不能直接下方。 – 2015-11-09 17:37:20
如果我記得不錯,我們最終會訴諸本地日期選擇器。所以不能真正幫助這一點。它看起來像在這種特殊情況下,出於某些原因,我們從來沒有取消本地日期選擇器,但我從來沒有得到這個問題的底部,因爲它已經「解決了自己」出來;) – robjez 2015-11-09 22:12:37