# Class k.u.s.DateSearchFilter(SearchFilter):

Part of kiwi.ui.search View In Hierarchy

A filter which helps you to search by a date interval. Can be customized through add_option.

Class | Type | Undocumented
Method | __init__ | Create a new DateSearchFilter object.
Method | get_state | Implement this in a subclass
Method | clear_options | Removes all previously added options
Method | add_option | Adds a date option
Method | add_option_fixed | Adds a fixed option, eg one for which date is not
Method | add_option_fixed_interval | Adds a fixed option interval, eg one for which the dates are not
Method | get_start_date | Get the start date.
Method | get_end_date | Get the end date.
Method | set_use_date_entries | Toggles the visibility of the user selectable date entries
Method | select | selects an item in the combo
Method | _update_dates | Undocumented
Method | _update_sensitivity | Undocumented
Method | _internal_set_start_date | Undocumented
Method | _internal_set_end_date | Undocumented
Method | _on_mode__content_changed | Undocumented
Method | _on_start_date__changed | Undocumented
Method | _on_end_date__changed | Undocumented

Inherited from SearchFilter:

Method | do_set_property | Undocumented
Method | do_get_property | Undocumented
Method | set_label | Undocumented

def __init__(self, label=''):
overrides kiwi.ui.search.SearchFilter.__init__
Create a new DateSearchFilter object.

Parameters | label | name of the search filter

def get_state(self):
overrides kiwi.ui.search.SearchFilter.get_state
Implement this in a subclass

def clear_options(self):
Removes all previously added options

def add_option(self, option_type, position=-2):
Adds a date option

Parameters | option_type | option to add (type: a `DateSearchOption` subclass )

def add_option_fixed(self, name, date, position=-2):
Adds a fixed option, eg one for which date is not possible to modify.

Parameters | name | name of the option
| date | fixed data
| position | position to add the option at

def add_option_fixed_interval(self, name, start, end, position=-2):
Adds a fixed option interval, eg one for which the dates are not possible to modify.

Parameters | name | name of the option
| start | start of the fixed interval
| end | end of the fixed interval
| position | position to add the option at

def get_start_date(self):
Get the start date.

Returns | start date (type: datetime.date or None )

def get_end_date(self):
Get the end date.

Returns | end date (type: datetime.date or None )

def set_use_date_entries(self, use_date_entries):
Toggles the visibility of the user selectable date entries

Parameters | use_date_entries |

def select(self, data=None, position=None):
selects an item in the combo Data or position can be sent in. If nothing is sent in the first item will be selected, if any

Parameters | data | data to select
| position | position of data to select

def _update_dates(self):
Undocumented
def _update_sensitivity(self):
Undocumented
def _internal_set_start_date(self, date):
Undocumented
def _internal_set_end_date(self, date):
Undocumented
def _on_mode__content_changed(self, mode):
Undocumented
def _on_start_date__changed(self, start_date):
Undocumented
def _on_end_date__changed(self, end_date):
Undocumented