Class: Datagrid::Filters::DateTimeFilter
- Inherits:
-
BaseFilter
- Object
- BaseFilter
- Datagrid::Filters::DateTimeFilter
show all
- Includes:
- RangedFilter
- Defined in:
- lib/datagrid/filters/date_time_filter.rb
Instance Method Summary
collapse
#default_filter_where, #initialize, #parse_values, #range?
Instance Method Details
11
12
13
14
15
16
17
|
# File 'lib/datagrid/filters/date_time_filter.rb', line 11
def format(value)
if formats.any? && value
value.strftime(formats.first)
else
super
end
end
|
#parse(value) ⇒ Object
7
8
9
|
# File 'lib/datagrid/filters/date_time_filter.rb', line 7
def parse(value)
Datagrid::Utils.parse_datetime(value)
end
|