TDDatePicker Locale #14

Closed
lucianoenrico opened this Issue Jan 29, 2013 · 3 comments

Comments

Projects
None yet
3 participants

Hi,
currently the date picker locale is set to US (in the TDDatePickerController.xib file). It must be more correct to use the current device locale.

It can be accomplished in the .xib file or setting to nil the locale property of the Date picker.

I think everyone will appreciate it.

Thank you

Contributor

stuffmc commented Feb 26, 2013

+1

Owner

reednj commented Feb 26, 2013

I agree this should be done, but I don't really have the time at the moment
for it. But if someone sends me a pull request, I will merge it in

On 26 February 2013 19:16, StuFF mc notifications@github.com wrote:

+1


Reply to this email directly or view it on GitHubhttps://github.com/reednj/TDSemiModal/issues/14#issuecomment-14130361
.

Contributor

stuffmc commented Feb 27, 2013

Hey @lucianoenrico — Here is how I use it, clearing the "Clear" button and using the current locale ;-)

_datePickerController = [[TDDatePickerController alloc] initWithNibName:@"TDDatePickerController" bundle:nil];
_datePickerController.delegate = self;
[self presentSemiModalViewController:_datePickerController inView:self.navigationController.view];
_datePickerController.toolbar.items = @[_datePickerController.toolbar.items[0], _datePickerController.toolbar.items[1], _datePickerController.toolbar.items[3]];
_datePickerController.datePicker.datePickerMode = UIDatePickerModeTime;
_datePickerController.datePicker.date = myDate;
_datePickerController.datePicker.locale = [NSLocale currentLocale];

Given that last line, I think @reednj can close this Bug ;) You're welcome ;-) Not also I changed to a Time Picker.

reednj closed this in bf179d3 Feb 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment