'Method to Ajax-retrieve the current options of this widget
@param resource: the S3Resource'

def ajax_options(self, resource):

    auto_range = self.opts.get('auto_range')
    if (auto_range is None):
        auto_range = current.deployment_settings.get_search_dates_auto_range()
    if auto_range:
        (min, max, ts) = self._options(resource)
        attr = self._attr(resource)
        options = {attr['_id']: {'min': min, 'max': max, 'ts': ts}}
    else:
        options = {}
    return options
