Select to view content in your preferred language

AGSPopupFieldInfo´s dateFormat

2485
0
11-02-2014 01:40 AM
KristofferStenersen
Regular Contributor

Hi, I´m having an issue when editing a feature using the AGSPopupsContainerViewController.

For a particular field, the datatype is esriFieldTypeDate, and when eiting this field, I´d like to only show the year in the date-picker. I´m setting it up something like this:

AGSPopupInfo *popupInfo = [AGSPopupInfo popupInfoForGDBFeatureTable:myGdbFeatureTable];

for (AGSPopupFieldInfo *fieldInfo in popupInfo.fieldInfos) {

     if ([info.fieldName isEqualToString:nameOfDateField]) {

          info.dateFormat = AGSPopupFieldInfoDateFormatYear;

     }

}

AGSPopup *popup = [[AGSPopup alloc] initWithGDBFeature:myGdbFeature popupInfo:popupInfo];

[popupVC setPopups:@[popup]];

But, for any format I´m setting, the format is the default month-day-year.

Ideas, anyone?

Thanks,

Kristoffer

Tags (2)
0 Kudos
0 Replies