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

Where to declare form field option strings. #436

Open
WA-Will opened this issue Jan 12, 2016 · 9 comments
Open

Where to declare form field option strings. #436

WA-Will opened this issue Jan 12, 2016 · 9 comments

Comments

@WA-Will
Copy link

WA-Will commented Jan 12, 2016

In your writeup (which is great by the way), you mention that options (like time from dateTime) are declared in the interface. Can you give me an example of this in a file?

@nicklockwood
Copy link
Owner

Which writeup are you referring to?

@WA-Will
Copy link
Author

WA-Will commented Jan 12, 2016

Your readme. I'm trying to declare my dateTime object as just a Time.

@nicklockwood
Copy link
Owner

In your form class, add the following method:

- (NSDictionary *)<nameOfYourProperty>Field {
  return @{FXFormFieldType: FXFormFieldTypeTime};
}

@nicklockwood
Copy link
Owner

(You don't have to declare it in the @interface, only in the @implementation)

@WA-Will
Copy link
Author

WA-Will commented Jan 12, 2016

Wow, that was obvious and easy. Thanks!

One more obvious and easy one. Can I change the display text string to the actual time I chose and just the time?

@nicklockwood
Copy link
Owner

Try

- (NSDictionary *)<nameOfYourProperty>Field {
  return @{FXFormFieldType: FXFormFieldTypeTime, FXFormFieldTitle: @""};
}

@WA-Will
Copy link
Author

WA-Will commented Jan 12, 2016

That wasn't quite what I was looking for. I'm trying to format the date string value. I'd like it to show only the time. And the time I've selected. Currently, it's displaying a different time.

@nicklockwood
Copy link
Owner

Er… that's curious. Maybe an issue with the locale being different for the picker than the label?

@WA-Will
Copy link
Author

WA-Will commented Jan 13, 2016

I'm getting an entire formatted date string when I choose a time. I'm hoping to make the value equal the time chosen.

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

2 participants