[英]iOS - single select in Kal calendar
i face little problem with kal calendar library , I cant use single selection , when I select a day the next day is selected , i need single select without offset 我在Kal日历库中遇到的问题很少,我不能使用单选,当我选择第二天的某天时,我需要没有偏移的单选
here is the problem 这是问题
here is the code in applicationDidFinishLaunching
这是
applicationDidFinishLaunching
的代码
//#define Single
#ifdef Single
kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeSingle];
kal.selectedDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
#else
kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeRange];
kal.beginDate = [NSDate dateStartOfDay:[NSDate date]];
kal.endDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
#endif
what i have been tried 我尝试过的
1- I set offsetDay:1
To offsetDay:0
then delete it in KalSelectionModeSingle mode but its still the same 1-我将
offsetDay:1
设置为offsetDay:0
然后在KalSelectionModeSingle模式下将其删除,但仍然相同
2- comment KalSelectionModeRange mode 2-注释KalSelectionModeRange模式
//kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeRange];
//kal.beginDate = [NSDate dateStartOfDay:[NSDate date]];
//kal.endDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
i get white window with no data 我得到没有数据的白色窗口
any help 任何帮助
thank you 谢谢
i figure the answer simply get my code out 我认为答案只是让我的代码出来
//#define Single
#ifdef Single
kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeSingle];
kal.selectedDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
#else
kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeRange];
kal.beginDate = [NSDate dateStartOfDay:[NSDate date]];
kal.endDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
#endif
To 至
kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeSingle];
kal.selectedDate = [NSDate dateStartOfDay:[[NSDate date] offsetDay:1]];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.