-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of range date in strftime() causes report failure #32
Comments
If there any way to prevent user from the wrong input - thats great |
Hi @toropok, |
@ramonski aha, cool. Does it make sense to remove strftime conversion from the 149 and 164 lines at |
The <input type="date"
class="form-control"
tal:define="date_from here/date_from"
tal:attributes="value python:view.dtime.date_to_string(date_from) if date_from else ''"
name="senaite.databox.date_from"> |
yeah, that works (if import dtime directly in DataBoxView class, otherwise it is invisible in class DataBoxView(ListingView):
"""The default DataBox view
"""
from senaite.core.api import dtime
template = ViewPageTemplateFile("templates/databox_view.pt") should we add it as PR? |
Yes, that would be great! Then it will get part of the upcoming 2.5 release. |
im very sorry I missed somehow your message :( my bad created that micro PR: #33 |
No worries, we can make another dot release if more comes |
If user puts date with year value earlier than 1900 year in
date_from
anddate_to
field:that causes exception in
databox_controls.pt
:would you mind if we add year check in the setter method, like this:
Or there any better options?
The text was updated successfully, but these errors were encountered: