Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization display #10

Open
zhengjin opened this issue Oct 28, 2015 · 0 comments
Open

Localization display #10

zhengjin opened this issue Oct 28, 2015 · 0 comments

Comments

@zhengjin
Copy link

I have some problems in the locale set.
UIDatePicker *date1=[[UIDatePicker alloc]init];
[date1 setLocale:[NSLocale localeWithLocaleIdentifier:@"zh_CN"]];//set china local
date1.datePickerMode=UIDatePickerModeDate;
picker.datePickerView=date1;
picker.pickerType = SBPickerSelectorTypeDate; //select date(needs implements delegate method with date)
picker.datePickerType = SBPickerSelectorDateTypeOnlyDay;//display format yyyy-MM-dd

picker.doneButtonTitle = @"Done";
picker.cancelButtonTitle = @"Cancel";
picker.delegate = self;
//[picker showPickerOver:self];

CGPoint point = [self.view convertPoint:[sender frame].origin fromView:[sender superview]];
CGRect frame = [sender frame];
frame.origin = point;
[picker showPickerIpadFromRect:frame inView:self.view];

But this not work, display month, day, and year (e.g. November | 15 | 2007).
I want displays year ,month, and day depending on the locale setting (e.g. 2007 | November | 15 )
version: 'SBPickerSelector', '~> 1.1.0'.
Thanks for any suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant