Welcome, Guest
Username Password: Remember me

Transfer dates to a calendar
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Transfer dates to a calendar

Transfer dates to a calendar 1 year, 5 months ago #1

Morning

Is it possible for date fields that are entered in say the task form to be entered into a custom calendar that can be part of the App ?

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Transfer dates to a calendar 1 year, 5 months ago #2

Sure Iain, Sensible TableView always gives you full access to all values entered by the user, whether you're using key-binding or object/CoreData-binding. After the user enters the date, you can update your custom calendar by implementing an SCTableViewModelDelegate method called "tableViewModel:valueChangedForRowAtIndexPath:". Here is an example:

 
// This method gets called whenever the value of the cell at the specified indexPath changes
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
valueChangedForRowAtIndexPath:(NSIndexPath *)indexPath
{
SCTableViewCell *cell = [tableViewModel cellAtIndexPath:indexPath];
if([cell isKindOfClass:[SCDateCell class]])
{
SCDateCell *dateCell = (SCDateCell *)cell;
 
// You can access the selected date here by accessing dateCell.datePicker.date
}
}
 
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.25 seconds