Fix the publishstart option in advsearch
This commit is contained in:
parent
bf5de95fdc
commit
fed9eff7b8
|
@ -19,7 +19,7 @@
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label for="publishstart">{{_('Published Date From')}}</label>
|
<label for="publishstart">{{_('Published Date From')}}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" style="position: static;" class="datepicker form-control" name="publish_start" id="publishstart" value="">
|
<input type="text" style="position: static;" class="datepicker form-control" name="publishstart" id="publishstart" value="">
|
||||||
<input type="text" style="position: absolute;" class="form-control fake-input hidden" id="fake_publishstart" value="">
|
<input type="text" style="position: absolute;" class="form-control fake-input hidden" id="fake_publishstart" value="">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" id="publishstart_delete" class="datepicker_delete btn btn-default"><span class="glyphicon glyphicon-remove-circle"></span></button>
|
<button type="button" id="publishstart_delete" class="datepicker_delete btn btn-default"><span class="glyphicon glyphicon-remove-circle"></span></button>
|
||||||
|
|
|
@ -1224,7 +1224,7 @@ def extend_search_term(searchterm,
|
||||||
format_date(datetime.strptime(pub_end, "%Y-%m-%d"),
|
format_date(datetime.strptime(pub_end, "%Y-%m-%d"),
|
||||||
format='medium', locale=get_locale())])
|
format='medium', locale=get_locale())])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pub_start = u""
|
pub_end = u""
|
||||||
elements = {'tag': db.Tags, 'serie':db.Series, 'shelf':ub.Shelf}
|
elements = {'tag': db.Tags, 'serie':db.Series, 'shelf':ub.Shelf}
|
||||||
for key, db_element in elements.items():
|
for key, db_element in elements.items():
|
||||||
tag_names = calibre_db.session.query(db_element).filter(db_element.id.in_(tags['include_' + key])).all()
|
tag_names = calibre_db.session.query(db_element).filter(db_element.id.in_(tags['include_' + key])).all()
|
||||||
|
@ -1295,7 +1295,7 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
|
||||||
column_end = term.get('custom_column_' + str(c.id) + '_end')
|
column_end = term.get('custom_column_' + str(c.id) + '_end')
|
||||||
if column_start:
|
if column_start:
|
||||||
searchterm.extend([u"{} >= {}".format(c.name,
|
searchterm.extend([u"{} >= {}".format(c.name,
|
||||||
format_date(datetime.strptime(column_start, "%Y-%m-%d"),
|
format_date(datetime.strptime(column_start, "%Y-%m-%d").date(),
|
||||||
format='medium',
|
format='medium',
|
||||||
locale=get_locale())
|
locale=get_locale())
|
||||||
)])
|
)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user