Closed i-am-chris closed 7 years ago
Hi @i-am-chris,
You can access the row that you want to modify, change its minimum date through cellConfig
and then update it it. You can use next code as a snippet:
-(void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue {
[super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
if([rowDescriptor.tag isEqualToString:@"f1_from"]) {
// .. add your code to calculate the new minimum date
XLFormRowDescriptor *row = [self.form formRowWithTag:@"f1_to"];
[row.cellConfig setValue: theNewV1 forKeyPath:@"minimumDate"];
[self updateFormRow:row]; // You might need to update the row's value before this line
}
}
Otherwise, we use our GitHub project for bug reports and feature requests. In the future, you should open questions like this on Stack Overflow and tag xlform
.
Thanks, just woke up. @m-revetria you rock! Did not know how to call a XLFormDescriptor row ... makes sense now.
Hello. Please take a look at this: in my form i have this definition:
NOW I HAVE THIS PROBLEM: I need to modify the minimum date on the TO (second row) to be the row1.value + 3h so i proceed to do:
Can anyone tell me if this is achievable?? I am struggling with this for 21h stright... may be the lack of sleep ๐ or the brain is dead :)