I have two questions, both relate to using Pickers in the editor. First, is there a way to find out if a Picker is "open" and if so change the editorValueLabel. So for an example in the Calendar App if you tap on a Date and the DatePicker opens up the text on the field that's being changed changes to a red color. The second issue is that is there a way to update the value of another field based on what was committed by the Picker? I have added the didCommitProperty method and I can see when one date is updated, but what I would want to do is that if that date is set to something further ahead of the second date then the second date needs to be updated as well (basically I have a start and end time for a meeting and need to make sure the times selected work for the server). Here's an example of what I got but the dataForm doesn't update to show the new time even though it looks like it's being saved correctly.
override func
dataForm
(dataForm: TKDataForm, didCommitProperty
property
: TKEntityProperty) {
//when the start date is changed make sure it's before the end date
if
property
.name
==
"startDate"
{
//get the new start date that was saved
let newStart =
self
.editableEvent
.startDate
let currentEnd =
self
.editableEvent
.endDate
//check if the start date is before the end date
if
newStart
.compare
(currentEnd) ==
.OrderedDescending
{
//the end date needs to be updated to 30 minutes after the new start date
let newEndDate = newStart
.getXMinutesFromDate
(minutes:
30
)
self
.editableEvent
.endDate
= newEndDate
self
.dataForm
.update
()
}
}